PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with...

28
PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus MLM in Mplus – Data structure and syntax Intercept only model Level 1 predictors Intercepts and slopes as outcomes Measures within persons LGM and MLM Multilevel CFA Additional resources Mplus manual (especially Chapter 9) Hox, J. J. (2010). Multilevel analysis. Techniques and applications. 2 nd ed.

Transcript of PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with...

Page 1: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

• MLM in Mplus – Data structure and syntax

• Intercept only model

• Level 1 predictors

• Intercepts and slopes as outcomes

• Measures within persons

• LGM and MLM

• Multilevel CFA Additional resources Mplus manual (especially Chapter 9) Hox, J. J. (2010). Multilevel analysis. Techniques and applications. 2nd ed.

Page 2: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Example (from Joop Hox book on Multilevel Analysis, 2010)

Data Level 1: pupils (2000 in total) Level 2: Classes (100 classes of approx 20 pupils each) Outcome variable: pupil popularity (scale 0-10) Predictor variables at pupil level (level 1) pupil gender (1=girl 0=boy) pupil extraversion (scale 1-10) Predictor variable(s) at class level (level 2) teacher experience (scale 2-25)

Page 3: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Data Structure

Page 4: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Scatterplot of Extraversion by Popularity for Each Class

Page 5: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Intercepts and Slopes as Outcome Variables Model Mplus Diagram

EXTRAV

Teacher Experience

POPULAR

POPULAR (intercept)

S_Extrav

WITHIN

BETWEEN

S_Extrav

Page 6: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Example: Intercept Only Model

Page 7: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Intercept Only Model

0.695/(0.695 + 1.222) = .362

Page 8: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Level-1 Predictor Fixed

Note: in this model, we are estimating random variation in the intercepts but not in the slopes

Page 9: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Level-1 Predictor Fixed

EXTRAV

POPULAR

POPULAR (intercept)

WITHIN

BETWEEN

S_Extrav .498 .930

Mean = 5.078 Var = .710

Page 10: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Level-1 Predictor Random

Note: in this model, we are estimating random variation in the intercepts and in the slopes (popularity regressed on extraversion)

Page 11: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Level-1 Predictor Random

EXTRAV

POPULAR

POPULAR (intercept)

S_Extrav

WITHIN

BETWEEN

S_Extrav .892

Mean =5.078 Var = 0.711

Mean = 0.497 Var = .033

Page 12: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Adding a Level-2 Predictor

Note: in this model, we add a Level-2 predictor. We regress both the intercepts and the slopes on this predictor. (I also included a correlation between the intercept and slope residuals)

Page 13: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Adding a Level-2 Predictor

-.017

EXTRAV

Teacher Experience

POPULAR

POPULAR (intercept)

S_Extrav

WITHIN

BETWEEN

S_Extrav

-.027

Intercept = 5.076 Var = .547

.062

.888

Intercept =.499 Var = .002

Page 14: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Replicating in SPSS Mixed Models

Page 15: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Previous Model in SPSS Mixed Models

Page 16: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Previous Model in SPSS Mixed Models

Note: model not exactly the same (level-1 predictor grand-mean centered instead of group-mean centered)

Page 17: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Previous Model in SPSS Mixed Models

Page 18: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Exact Same Model in Mplus (all predictors grand-mean centered)

Page 19: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Measures within Persons

When your data file is structured in the conventional one line per subject with repeated measures on the same line

Page 20: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Measures within Persons

Time (linear)

Drink

Drink (intercept)

Slope

WITHIN

BETWEEN

Slope 10.076

-0.139

Mean = -.118 Var = .782

Mean = 5.236 Var = 31.765

Page 21: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Measures within Persons (Previous Model specified as LGM)

Back to the conventional data structure specification

IN LGM these residuals are usually not constrained to equality but they are in MLM. I constrained them here.

Page 22: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Example: Measures within Persons (LGM and MLM)

LGM MLM

Same as in slide 13

Page 23: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Example: Measures within Persons (LGM and MLM)

LGM MLM

0.00

M = -0.119 Var = .0776

M = 5.238 Var = 31.784

Page 24: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Example: Measures within Persons (LGM and MLM)

MLM LGM

Page 25: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Multilevel CFA

Page 26: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Multilevel CFA (data from Joop Hox, 2010)

Page 27: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Multilevel CFA (data from Joop Hox, 2010)

Page 28: PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with …publish.uwo.ca/~ptrembla/lecture11-fall2013.pdf · PSY 9555A (Nov 13): SEM Approach to Multilevel Modeling with Mplus

Multilevel CFA (data from Joop Hox, 2010)