General Structural Equations (LISREL) Week 1 #4 1 Today: Quick look at more AMOS examples… Extending the work with AMOS: 1. 2. 3. 2 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: 3 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). 4 Two examples of SIMPLIS programs Example 1 SIMPLIS Example for Religion Sexual Morality Data System file from file f:\Classes\ICPSR2005\Week1Examples\ReligSexMoralSIMPLIS\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 5 SIMPLIS Example for Religion Sexual Morality Data Output Covariance Matrix V9 V147 V175 V176 V304 -------- -------- -------- -------- -------- -------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 V307 0.79 1.85 0.46 -2.57 1.70 V308 0.65 1.51 0.37 -1.93 1.59 V309 1.11 2.39 0.58 -3.12 1.61 V305 3.52 1.69 1.61 1.83 Covariance Matrix V307 V308 V309 -------- -------- -------V307 7.26 V308 3.13 4.61 V309 4.02 2.83 7.76 6 LISREL Estimates (Maximum Likelihood) Measurement Equations Output 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 7 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 8 Covariance Matrix of Independent Variables Relig Sexmor Relig -------2.77 (0.21) 13.18 Sexmor -------- 1.59 (0.11) 14.25 2.38 (0.17) 14.32 9 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 10 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 11 Another SIMPLIS Example (Same 2 latent variables with singleindicator 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 12 Output Covariance Matrix V307 V308 V309 V355 V356 SEX V307 -------7.264 3.132 4.023 -7.317 1.447 -0.101 (portion) V308 -------- V309 -------- V355 -------- V356 -------- SEX -------- 4.606 2.832 -5.385 0.656 0.123 7.758 -4.860 1.455 0.019 305.580 -8.744 -0.107 4.869 0.090 0.250 13 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 14 Standardized • In Simplis: OPTIONS SC Completely Standardized Solution LAMBDA-Y V9 V147 V175 V176 V304 V305 V307 V308 V309 Relig -------0.848 0.668 0.598 -0.821 - - - - - - Sexmor -------- - - - 0.560 0.540 0.721 0.709 0.706 15 Standardized GAMMA Relig Sexmor V355 --------0.143 -0.170 V356 -------0.104 0.225 SEX -------0.130 0.014 16 Moving from Stat Package System files to SEM Software AMOS (reads Directly from SPSS system files) SPSS SYSTEM FILE AMOS Use PRELIS SPSS SYSTEM FILE SAS, Stata, etc. SYSTEM FILE A ‘DSF’ file created by PRELIS A raw covarianc ematrix (lower triangle) created by PRELIS LISREL reads DSF files LISREL reads lower triangular matrices LISREL 17 Fit of a model How far apart are Σ and S? Test of significance for H0: Σ=S chi-square test Test is a simple function of N: Note: “Independence chi-square” is a different test! It tests H0: S=0 Χ2 = F*(N-1) “Perfect fit” (non-significant chi-square) much easier to obtain in small samples 18 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) 19 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) 20 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 21 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. 22 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 23 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). 24 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 25 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) VAR-E1 VAR-E2 VAR-E3 E1 E2 E3 1 1 1 1 b1 b2 26 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 VAR-E1 VAR-E2 VAR-E3 E1 E2 E3 1 1 1 1 b1 b1 27 Equality Constraints in Structural Equation Models VAR-E1 VAR-E2 VAR-E3 We can set “equality constraints” on any two (or more) parameters in a model In SIMPLIS, we do this by adding statements: E1 E2 E3 1 1 1 1 b1 b1 Let the path from Relig to V176 be equal to the path from Relig to V167. 28 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] VAR-E1 VAR-E2 VAR-E3 E1 E2 E3 1 1 1 1 b1 b1 29 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 b1 b2 b3 1 1 1 1 30 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 b1 b2 b3 1 1 1 1 31 Dummy Variables in Structural Equation Models • Dummy variables can be included in structural equation models if they are completely exogenous 1 1 SEX 1/0 1 1 Sex: 0/1 variable 32 Dummy Variables in Structural Equation Models • Dummy variables can be included in structural equation models if they are completely exogenous 1 1 SEX 1/0 1 1 Educ Age 33 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 e1 e2 e3 1 1 1 VOTED Trust Pol. Cor 1 This model is NOT appropriate Pol Partic 34 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) 35 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 36 DUMMY VARIABLES D1 1 D2 1 1 D3 1 (add curved arrow D1 D2 ) 37 DUMMY VARIABLES D1 b1 1 D2 b2 1 1 b3 D3 1 Test H0 for entire religion variable: estimate model with parameters b1, b2 and b3 all set to 0 38 (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 39 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 40 DUMMY VARIABLES •Test Protestant (category 1) vs. Catholic (category2): • Model 1 (3 separate parameters) • Model 2 (fix b1=b2) df=1 41 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 42 Matrix form We can represent the previous 2 equations in matrix form: Matrix Form (single, double subscript) 43 There are other matrices in this model Variance-covariance matrix of error terms (e’s) 44 (other matrices, continued) Variance covariance matrix of exogenous (manifest) variables 45 Two scalar equations re-written scalar Matrix Contents of matrices 46 More generic form (combines all exogenous variables into single matrix) More generic: Where E1 Ξ X1, E2 Ξ X2 and E3 Ξ X3 47 More generic form: All exogenous variables part of a single variance-covariance matrix 48