2-1-2 two level SEM model PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Li Lu posted on Thursday, March 21, 2013 - 3:54 am
Dear Prof. Muthen, my X(ManipulC) and Y (Totmean) are at group level, and mediator (partial, M, ExIntB) is at individual level. M has 4 indicators (ExIn1 ExIn2 ExIn3 ExIn4). I am using Preacher, Zyphur & Zhang(2010)'s 2-1-2 syntax. Below are my syntax:
"title: 2-1-2 mediation model
data: FILE IS "C:\Users\Li\Desktop\N_212.csv";
variable:
NAMES = id Team ManipulC ExIn1 ExIn2 ExIn3 ExIn4 Totmean;
USEVAR = Team ManipulC ExIn1 ExIn2 ExIn3 ExIn4 Totmean;
MISSING are All(999);
BETWEEN ARE ManipulC Totmean;
CLUSTER IS Team;
Analysis:
TYPE IS TWOLEVEL RANDOM;
MODEL:
%WITHIN%
ExIntB BY ExIn1 ExIn2 ExIn3 ExIn4;
%BETWEEN%
ManipulC Totmean;
ExIntB ON ManipulC(a);
Totmean ON ExIntB(b);
Totmean ON ManipulC;
MODEL CONSTRAINT:
NEW(indb);
indb=a*b;
OUTPUT: TECH1 TECH8 CINTERVAL;"
But I got error message saying:
*** ERROR in MODEL command
Within-level variables cannot be used on the between level.
Within-level variable used: EXINTB
*** ERROR
The following MODEL statements are ignored:
* Statements in the BETWEEN level:
EXINTB ON MANIPULC
TOTMEAN ON EXINTB
Would you please let me know where I did wrong? Thanks you so much!
 Matt McLarnon posted on Thursday, March 21, 2013 - 1:15 pm
You've just defined the ExIntB latent variable on the within level, and then specify it again on the between level.
You'll need to specify two separate latent variables on the within and between levels, but using the same indicators.
e.g., %WITHIN% ExIntW BY ExIn1 ExIn2 ExIn3 ExIn4;
%BETWEEN% ExIntB BY ExIn1 ExIn2 ExIn3 ExIn4;
 Li Lu posted on Saturday, March 23, 2013 - 12:35 am
Hi Matt, thank you so much for pointing that out. Now the model runs!!!

Another problem I have is that my X (cluster level) is actually a dummy variable. Does that affect my modeling? how can I accommodate that?

Thank you again!
 Linda K. Muthen posted on Saturday, March 23, 2013 - 3:03 pm
A covariate can be a binary variable. I am not sure I understand your concern. Just put it on the right-hand side of ON. See examples in Chapter 9 of the user's guide.
 Li Lu posted on Sunday, March 24, 2013 - 12:14 am
Hi Linda, thank you for your reply. so this is our updated syntax. The results (ns) we got from it were very different from what we analyzed through Lisrel (significant). We would like to present the result using Mplus multilevel SEM though. So would you please let me know anything we can improve here? Thanks!

title: 2-1-2 mediation model
data: FILE IS "C:\Users\Li\Desktop\N_212.csv";
variable:
NAMES = id Team ManipulC ExIn1 ExIn2 ExIn3 ExIn4 Totmean;
USEVAR = Team ManipulC ExIn1 ExIn2 ExIn3 ExIn4 Totmean;
MISSING are All(999);
BETWEEN ARE ManipulC Totmean;
CLUSTER IS Team;
Analysis:
TYPE IS TWOLEVEL RANDOM;
MODEL:
%WITHIN%
ExIntW BY ExIn1 ExIn2 ExIn3 ExIn4;
%BETWEEN%
ExIntB By ExIn1 ExIn2 ExIn3 ExIn4;
ManipulC Totmean;
ExIntB ON ManipulC(a);
Totmean ON ExIntB(b);
Totmean ON ManipulC;
MODEL CONSTRAINT:
NEW(indb);
indb=a*b;
OUTPUT: TECH1 TECH8 CINTERVAL;"
 Linda K. Muthen posted on Sunday, March 24, 2013 - 6:16 pm
Your input looks fine. Please send your Mplus and Lisrel outputs and your license number to support@statmodel.com if you want to know how the two models differ.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: