490 likes | 605 Views
General Structural Equations (LISREL). Week 1 #4. Today:. Quick look at more AMOS examples… Extending the work with AMOS: Moving from factor model to causal model (construct equations among latent variables) adding single-indicator exogenous variables (assume no measurement error)
E N D
General Structural Equations (LISREL) Week 1 #4
Today: • Quick look at more AMOS examples… • Extending the work with AMOS: • Moving from factor model to causal model (construct equations among latent variables) • adding single-indicator exogenous variables (assume no measurement error) • adding single-indicator exogenous variables with assumed measurement error • Equality constraints in structural equation models • Dummy exogenous variables in structural equation models • SEM equivalents to contrasts • Block tests for dummy variables • AMOS example
Also Today: • Model fit (an overview) • The SIMPLIS program (part of LISREL) • Moving from Standard Stats packages into SEM software • Conceptualizing SEM models in Matrix terms (some basics)
The SIMPLIS interface for LISREL • Works in scalar, not matrix, terms • Fairly easy to use • Sometimes, output is provided in regular LISREL matrix form (can be a bit confusing) • Requires a lower-triangular covariance matrix (most stats packages produce “square” matrices) OR a special “.dsf” file (both can be created by the PRELIS program which accompanies LISREL).
Two examples of SIMPLIS programs Example 1 SIMPLIS Example for Religion Sexual Morality Data System file from file f:\Classes\ICPSR2005\Week1Examples\ReligSexMoral-SIMPLIS\ReligSex1.dsf Latent Variables Relig Sexmor Relationships: V9 V175 V176 = Relig V147 = 1*Relig V304 V305 V307 V309 = Sexmor V308 = 1*Sexmor End of problem
SIMPLIS Example for Religion Sexual Morality Data Covariance Matrix V9 V147 V175 V176 V304 V305 -------- -------- -------- -------- -------- -------- V9 0.82 V147 1.34 6.50 V175 0.31 0.75 0.48 V176 -1.64 -3.49 -1.09 6.77 V304 0.40 1.06 0.29 -1.52 2.90 V305 0.46 0.98 0.27 -1.45 1.34 3.52 V307 0.79 1.85 0.46 -2.57 1.70 1.69 V308 0.65 1.51 0.37 -1.93 1.59 1.61 V309 1.11 2.39 0.58 -3.12 1.61 1.83 Covariance Matrix V307 V308 V309 -------- -------- -------- V307 7.26 V308 3.13 4.61 V309 4.02 2.83 7.76 Output
LISREL Estimates (Maximum Likelihood) Measurement Equations V9 = 0.44*Relig, Errorvar.= 0.28 , Rý = 0.66 (0.018) (0.015) 25.20 18.41 V147 = 1.00*Relig, Errorvar.= 3.73 , Rý = 0.43 (0.16) 23.93 V175 = 0.27*Relig, Errorvar.= 0.27 , Rý = 0.44 (0.013) (0.011) 21.54 23.78 V176 = - 1.35*Relig, Errorvar.= 1.74 , Rý = 0.74 (0.052) (0.12) -25.96 14.68 Output
V304 = 0.63*Sexmor, Errorvar.= 1.96 , Rý = 0.33 (0.033) (0.082) 19.06 24.02 V305 = 0.66*Sexmor, Errorvar.= 2.49 , Rý = 0.29 (0.036) (0.10) 18.11 24.46 V307 = 1.25*Sexmor, Errorvar.= 3.57 , Rý = 0.51 (0.054) (0.17) 23.14 20.54 V308 = 1.00*Sexmor, Errorvar.= 2.23 , Rý = 0.52 (0.11) 20.33 V309 = 1.26*Sexmor, Errorvar.= 3.96 , Rý = 0.49 (0.055) (0.19) 22.81 21.01
Covariance Matrix of Independent Variables Relig Sexmor -------- -------- Relig 2.77 (0.21) 13.18 Sexmor 1.59 2.38 (0.11) (0.17) 14.25 14.32
Degrees of Freedom = 26 Minimum Fit Function Chi-Square = 213.09 (P = 0.0) Normal Theory Weighted Least Squares Chi-Square = 217.29 (P = 0.0) Estimated Non-centrality Parameter (NCP) = 191.29 90 Percent Confidence Interval for NCP = (147.95 ; 242.10) Minimum Fit Function Value = 0.15 Population Discrepancy Function Value (F0) = 0.13 90 Percent Confidence Interval for F0 = (0.10 ; 0.17) Root Mean Square Error of Approximation (RMSEA) = 0.071 90 Percent Confidence Interval for RMSEA = (0.063 ; 0.080) P-Value for Test of Close Fit (RMSEA < 0.05) = 0.00
Normed Fit Index (NFI) = 0.97 Non-Normed Fit Index (NNFI) = 0.97 Parsimony Normed Fit Index (PNFI) = 0.70 Comparative Fit Index (CFI) = 0.98 Incremental Fit Index (IFI) = 0.98 Relative Fit Index (RFI) = 0.96 Critical N (CN) = 312.87 Root Mean Square Residual (RMR) = 0.15 Standardized RMR = 0.035 Goodness of Fit Index (GFI) = 0.97 Adjusted Goodness of Fit Index (AGFI) = 0.94 Parsimony Goodness of Fit Index (PGFI) = 0.56
Another SIMPLIS Example(Same 2 latent variables with single-indicator exogenous variables added) SIMPLIS Example for Religion Sexual Morality Data Observed variables: V9 V147 V175 V176 V304 V305 V307 V308 V309 V310 V355 V356 SEX OCC1 OCC2 OCC3 OCC4 OCC5 Covariance matrix from file e:\ICPSR2005\RSM1.COV Sample size = 1457 Latent Variables: Relig Sexmor Relationships: V9 V175 V176 = Relig V147 = 1*Relig V304 V305 V307 V309 = Sexmor V308 = 1*Sexmor Equations: Relig = V355 V356 SEX Sexmor = V355 V356 SEX Let the error covariance of Relig and Sexmor be free Let the error covariance of V175 and V176 be free Options MI ND=3 SC End of problem
Output Covariance Matrix (portion) V307 V308 V309 V355 V356 SEX -------- -------- -------- -------- -------- -------- V307 7.264 V308 3.132 4.606 V309 4.023 2.832 7.758 V355 -7.317 -5.385 -4.860 305.580 V356 1.447 0.656 1.455 -8.744 4.869 SEX -0.101 0.123 0.019 -0.107 0.090 0.250
Error Covariance for V176 and V175 = -0.210 (0.0327) -6.417 Structural Equations Relig = - 0.0139*V355 + 0.0801*V356 + 0.443*SEX, Errorvar.= 2.735 , R2 = 0.0575 (0.00281) (0.0222) (0.0958) (0.204) -4.962 3.607 4.626 13.425 Sexmor = - 0.0148*V355 + 0.155*V356 + 0.0413*SEX, Errorvar.= 2.089 , R2 = 0.0973 (0.00255) (0.0204) (0.0860) (0.149) -5.795 7.587 0.480 13.995 Error Covariance for Sexmor and Relig = 1.454 (0.104) 13.954
Standardized Completely Standardized Solution LAMBDA-Y Relig Sexmor -------- -------- V9 0.848 - - V147 0.668 - - V175 0.598 - - V176 -0.821 - - V304 - - 0.560 V305 - - 0.540 V307 - - 0.721 V308 - - 0.709 V309 - - 0.706 • In Simplis: OPTIONS SC
Standardized GAMMA V355 V356 SEX -------- -------- -------- Relig -0.143 0.104 0.130 Sexmor -0.170 0.225 0.014
Use PRELIS SPSS SYSTEM FILE SPSS SYSTEM FILE A ‘DSF’ file created by PRELIS AMOS (reads Directly from SPSS system files) LISREL reads DSF files A raw covariancematrix (lower triangle) created by PRELIS SAS, Stata, etc. SYSTEM FILE LISREL reads lower triangular matrices Moving from Stat Package System files to SEM Software AMOS LISREL
Fit of a model • How far apart are Σ and S? • Test of significance for H0: Σ=S • chi-square test • Note: “Independence chi-square” is a different test! It tests H0: S=0 • Test is a simple function of N: • Χ2 = F*(N-1) • “Perfect fit” (non-significant chi-square) much easier to obtain in small samples
Fit of a model • Search for “fit indices” that are not a function of N • Desirable properties of fit indices: • Not a direct, linear function of N • Not affected by N (expect wider sampling distribution with smaller Ns.. this might imply that some types of fit indices yield “better” values for the same model in larger samples • Easily interpretable metric (e.g., 0 1) • Consistent across estimation methods • Not affected by metric of variables (e.g., same results whether variables standardized or not)
Fit of a model • Desirable properties of fit indices (more): • Do not reward data dredging (vs. construction of parsimonious models) • So-called “parsimony” measures include a penalty function for adding parameters to a model • Commonly-used fit measures: • Joreskog & Sorbom’s GFI (affected by N though) • Bentler’s Normed Fit Index (and NNFI) • Incremental, Comparative fit indices • Root Mean Square Error of Approximation (RMSEA) (for this index, low values are good)
Improving the fit of a model: diagnostics • Residuals: • Matrix of differences between sigma and S • Would need to standardize before we could determine where a model should be improved • A residual is not necessarily connected to one single parameter: • A high residual might imply any one of 3 or 4 parameters could/should be added to the model
Improving the fit of a model: diagnostics • Modification indices • Based on 2nd order derivative matrix • Estimate the improvement in model fit if a particular parameter is added • Metric: chi-square (difference) • Any value greater than 3.84 is “significant” at p<.05 BUT criteria other than straight significance can/have been employed • Reason: otherwise, sensitive to N; in large samples will never get parsimonious model, etc.
Modification Indices • In AMOS, click “modification indices” under output options • In SIMPLIS, Options MI Modification Indices and Expected Change (SIMPLIS model discussed ealrier) The Modification Indices Suggest to Add the Path to from Decrease in Chi-Square New Estimate V9 Sexmor 8.4 -0.06 V176 Sexmor 11.6 -0.18 V307 Relig 14.2 -0.21 V309 Relig 34.0 0.33
Important note on modification indices • It is not always the case that the parameter with the highest MI should be added to a model • Some MIs will not make substantive sense (e.g., in a causal model, an MI suggesting a path from respondent’s social status to parent’s social status).
Improving the fit of a model: diagnostics • Estimated parameter change values • Estimated value of a parameter that is currently fixed (if this parameter is “freed” [included in the model]). • Standardized values can be helpful in determining whether adding a parameter is substantively important
Equality Constraints in Structural Equation Models • We can set “equality constraints” on any two (or more) parameters in a model • E.g.: b1=b2 • E.g.: VAR(e1) = VAR(e2)
Equality Constraints in Structural Equation Models • We can set “equality constraints” on any two (or more) parameters in a model • In AMOS we do this by giving parameters names, and then using the same name in the locations where we want to impose equality constraints
Equality Constraints in Structural Equation Models • We can set “equality constraints” on any two (or more) parameters in a model • In SIMPLIS, we do this by adding statements: Let the path from Relig to V176 be equal to the path from Relig to V167.
Equality Constraints in Structural Equation Models • The b1=b2 constraint may not make sense if the metric of the 2 latent variables is not the same (makes most sense if variances are the same – would work if the variables were standardized]
Equality Constraints in Structural Equation Models • In this model, we could test b1=b2, b2=b3, b1=b3 or b1=b2=b3 by setting the parameter names to be the same • Equality constraints only make sense if variances of the 3 exogenous manifest variables are the same, though
Equality Constraints in Structural Equation Models • Formal tests: • Model 1 b1, b2 estimated separately • Model 2 b1=b2 (i.e., labels “b1” in each of 2 locations) • Model 2 has 1 more degree of freedom than model 1 • A df=1 test for the equality constraint is obtained by subtracting the model 1 chi-square from the model 2 chi-square
Dummy Variables in Structural Equation Models • Dummy variables can be included in structural equation models if they are completely exogenous Sex: 0/1 variable
Dummy Variables in Structural Equation Models • Dummy variables can be included in structural equation models if they are completely exogenous
Dummy Variables in Structural Equation Models • Dummy variables cannot be included in structural equation models as indicators of latent constructs VOTED = 0/1 voted/did not vote last election TRUST = 5 pt. trust in government item POL COR = 5 pt. agree/disagree politicians corrupt This model is NOT appropriate
Dummy Variables in Structural Equation Models • Dummy variables can be included in structural equation models if they are completely exogenous • For categorical independent variables with more than 2 categories, sets of dummy variables can be included (just like in regression models)
Dummy Variables in Structural Equation Models • For categorical independent variables with more than 2 categories, sets of dummy variables can be included (just like in regression models) • Design matrix as with Regression (could use effects or indicator coding; example below uses indicator coding): D1 D2 D3 Catholic 1 0 0 Protestant 0 1 0 Jewish 0 0 1 Atheist 0 0 0
DUMMY VARIABLES (add curved arrow D1 D2 )
DUMMY VARIABLES Test H0 for entire religion variable: estimate model with parameters b1, b2 and b3 all set to 0 (add curved arrow D1 D2 )
DUMMY VARIABLES Test H0 for entire religion variable: estimate model with parameters b1, b2 and b3 all set to 0
DUMMY VARIABLES • Test religion variable : b1=b2=b3=0 Model 1 (3 separate parameters) vs. Model 2 (all parameters = 0) df=3 test • Test Protestant (category 1) vs. Atheist (reference group): • Model 1 (3 separate parameters) • Model 2 (fix b1=0) df=1 • OR: look at t-test for b1 parameter
DUMMY VARIABLES • Test Protestant (category 1) vs. Catholic (category2): • Model 1 (3 separate parameters) • Model 2 (fix b1=b2) df=1
LV Structural Equation Models in Matrix terms Thus far, our work has involved “scalar” equations. • one equation at a time • Specify a model (e.g, with software) by writing these equations out, one line per equation
Matrix form We can represent the previous 2 equations in matrix form: Matrix Form (single, double subscript)
There are other matrices in this model Variance-covariance matrix of error terms (e’s)
(other matrices, continued) Variance covariance matrix of exogenous (manifest) variables
Two scalar equations re-written scalar Matrix Contents of matrices
More generic form (combines all exogenous variables into single matrix) More generic: Where E1 Ξ X1, E2 Ξ X2 and E3 Ξ X3
More generic form: All exogenous variables part of a single variance-covariance matrix