Structural Equation Modeling Using Stata - Statistical Horizons

Transcription

Structural Equation Modeling Using StataPaul D. Allison, Ph.D.Upcoming Seminar:August 16-17, 2018, Stockholm

2/3/20171Introduction toStructural Equation ModelingUsing Stata2Structural Equation Models3What is SEM good for?4SEM5Preview: A Latent Variable SEM6Latent Variable Model (cont.)7Cautions8Outline9Software for SEMs10Favorite Textbook1112Linear Regression in SEM13GSS2014 Example14Linear Regression with Stata15FIML for Missing Data16Further Reading17Assumptions18FIML in Stata19Path Diagram (from Mplus)20Path Analysis of Observed Variables21Some Rules and Definitions22Three Predictor Variables23Two-Equation System24Why combine the two equations?25Calculation of Indirect Effect26A More Complex Model27Decomposition of Direct & Indirect Effects28Standardized Coefficients1

2/3/201729Numerical Examples30More Complex Example31Decomposition of Effects32Illness Data33Summary Data34Covariance Matrix35Covariance Matrix for Illness Data36Illness Regression in Stata37Stata Results - Unstandardized38Counting Moments & Parameters39Mplus Results - Standardized40Illness Model with Indirect Effects41Model Diagram42Path Diagrams in Stata43Results44More Goodness of Fit Measures45Identification Status of the Model46Improving the Model47GOF for Improved Model48Estimates for Improved Model49Indirect Effects50Indirect Effects in Stata51Specific Indirect Effects in Stata52Partial Correlations53Partial Correlations (cont.)54Maruyama (1998) Data55Partial Correlations in Stata56Partial Correlation Results57Causal Ordering2

2/3/201758How to Decide59Nonrecursive Systems60Identification Problem in Nonrecursive Models61Identification Problem (cont.)62A Just-Identified Model63Reduced Form Equations64Solutions for Structural Parameters65Sufficient Condition for Identification66Varieties of Identification67Problems with Instrumental Variables68Example of a Nonrecursive Model69Nonrecursive Example (cont.)70Stata Code for Nonrecursive Model71Nonrecursive Results72GOF for Nonrecursive73Latent Variable Models74Roadmap for Latent Variables75Classical Test Theory76Random Measurement Error77Reliability78Parallel Measures79Tau-Equivalent Measures80Tau-Equivalance: Example81Tau-Equivalence in Stata82Congeneric Tests83Three Congeneric Tests84Three Congeneric Measures (cont.)85Identification in General86Standardized Version3

2/3/201787Digression: Tracing Rule for Correlations88Tracing Rule (cont.)89Tracing Rule (cont.)90Standardized Version of 3 Congenerics (cont.)91Three Congenerics: Example92Three Congenerics: Stata93Three Congenerics: Results94Four Congeneric Measures95Overidentification with 4 Congeneric Measures96Four Congeneric Measures with Stata97Estimates for Four Congenerics98GOF for Four Congenerics99Alternative Model for 4 Congeneric Measures100Stata for Alternative Model101Results for Alternative Model102Heywood Case103Factor Models104Factor Models (cont.)105Identification (Standardized)106Identification (cont.)107Two Approaches to Identification Problem108Identification (Unstandardized)109Determining Identification110Normalizing Constraints111Normalizing Constraints112ML Estimation of CFA Models113Multivariate Normality114ML Details115Chi-Square Test4

2/3/2017116Example: Self-Concept Measurement117Self Concept Path Diagram118Self Concept. Results119Self Concept Results (cont.)120Self Concept Results (cont.)121Global Goodness of Fit Measures122Other Global Measures123Other Global Measures (cont.)124Specific Goodness of Fit Measures125Standardized Residuals for Self-Concept Model126Modification Indices127Mod Indices for Self-Concept128Mod Indices for Self-Concept (cont.)129Freeing Up Parameters130Results from Freeing 1 Parameter131Selected Results (cont.)132Correlated Errors133Two Correlated Errors134A Five-Indicator Model135A Two-Factor Model136Example: Self-Concept Data137Selected Results138The General Structural Equation Model139GSS2014 Example: Stata Code140GSS2014 Example: GOF Results141GSS2014: Standardized Results142GSS2014: Standardized Results143Farm Manager Example (Rock et al. 1977)144Farm Managers Path Diagram5

2/3/2017145Farm Managers: Stata Code146Farm Managers. Selected Results147Selected Results (cont.)148A Tau-Equivalent Model149Parallel Model150Identification in SEM Models151An Identified SEM152What to Do If Endogenous Variables Aren’t Normal153Example: NLSY Data154ML Results for NLSY Data155Both Variables Highly Skewed156Satorra-Bentler Robust SE’s157Weighted Least Squares158Weighted Least Squares159WLS Results160Multiple Group Analysis161Subjective Class Example162Reading in the Data in Stata163Subjective Class Models164Stata Code for 2-Group Models165Stata Code (cont.)166Tests for Comparing the Groups167Model 2 Results168Model 2 Results (cont.)169Wald & Score Tests Comparing Groups170Output from estat ginvariant171More output from estat ginvariant172Interactions and Non-Linearities173Ordinal and Binary Data6

2/3/2017174Special Correlations175Special Correlations176Specialized Models177CFA Model with Categorical Indicators178Selected Results179Other Capabilities of gsem180Cautions About SEMs181Examples I Don’t Like182Examples I Like183SEMs and Causality184Exemplary Article185Some Recommendations:Lest you forget7

Introduction toStructural Equation ModelingUsing StataPaul D. Allison, InstructorFebruary 2017www.StatisticalHorizons.comCopyright 2017 Paul Allison1Structural Equation ModelsThe classic SEM includes many common linear modelsused in the behavioral sciences: Multiple regression ANOVA Path analysis Multivariate ANOVA and regression Factor analysis Canonical correlation Non-recursive simultaneous equations Seemingly unrelated regressions Dynamic panel data models2

What is SEM good for? Modeling complex causal mechanisms.Studying mediation (direct and indirect effects).Correcting for measurement error in predictor variables.Avoiding multicollinearity for predictor variables that aremeasuring the same thing.Analysis with instrumental variables.Modeling reciprocal relationships (2-way causation).Handling missing data (by maximum likelihood).Scale construction and development.Analyzing longitudinal data.Providing a very general modeling framework to handle allsorts of different problems in a unified way.3SEMConvergence of psychometrics andeconometrics Simultaneous equation models, possibly withreciprocal (nonrecursive) relationships Latent (unobserved) variables with multipleindicators. Latent variables are the most distinguishing featureof SEM. For example:4

Preview: A Latent Variable SEMfXaYbcudx1x2y1y2e1e2e3e4X and Y are unobserved variables, x1, x2, y1, and y2 areobserved indicators, e1-e4 and u are random errors.a, b, c, d, and f are correlation coefficients.5Latent Variable Model (cont.) If we know the six correlations among the observedvariables, simple hand calculations can produceestimates of a through f. We can also test the fit ofthe model. Why is it desirable to estimate models like this?– Most variables are measured with at least some error.– In a regression model, measurement error inindependent variables can produce severe bias incoefficient estimates.– We can correct this bias if we have multiple indicatorsfor variables with measurement error.– Multiple indicators can also yield more powerfulhypothesis tests.6

Cautions Although SEM’s can be very useful, themethodology is often used badly andindiscriminately.– Often applied to data where it’s inappropriate.– Can sometimes obscure rather than illuminate.– Easy to get sucked into overly complex roduction to SEMLinear regression with missing dataPath analysis of observed variablesDirect and indirect effectsIdentification problem in nonrecursive modelsReliability: parallel and tau-equivalent measuresMultiple indicators of latent variablesConfirmatory factor analysisGoodness of fit measuresStructural relations among latent variablesAlternative estimation methods.Multiple group analysisModels for ordinal and nominal data8

Software for SEMsLISREL – Karl Jöreskog and Dag SörbomEQS – Peter BentlerPROC CALIS (SAS) – W. Hartmann, Yiu-Fai YungAmos – James ArbuckleMplus – Bengt Muthénsem, gsem (Stata)Packages for R:OpenMX – Michael Nealesem – John Foxlavaan – Yves Rosseel9Favorite Textbook10

Structural Equation Modeling Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: August 16-17, 2018, Stockholm. 2/3/2017 1 Introduction to Structural Equation Modeling . 11.Alternative estimation methods. 12.Multiple group analysis 13.Models for ordinal and nominal data 8. Software for SEMs