3-2-1 Mediation Model with binary out... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 Claire Ryu posted on Thursday, May 31, 2018 - 9:01 am
I am new in Mplus.
I need to perform a mediation analysis for 3-2-1.
Can Mplus perform a 3-level SEM with binary outcome to test 3-2-1 mediation? Or is something else is available to test 3-2-1 mediation?

X: continous (level 3)
M: mediator, continous (level 2)
Y: outcome, binary (level 1)

I also want to know how to include predictors at each level.
Thank you so much!!!
 Tihomir Asparouhov posted on Thursday, May 31, 2018 - 11:23 am
Here is some sample code for your situation

names are y m x c2 c3;
between= m;
between=(c3) x;
cluster=c3 c2;

data: file=1.dat;

analysis: type = threelevel;

%between c2%
y on m; m;
%between c3%
y on m x;
m on x;
 Zhi Ye posted on Thursday, September 20, 2018 - 11:20 pm
Dear Dr Muthen,
I am running an 3-2-1 multilevel mediation model as following:
PVW by PV1@1 PV2 PV3 PV4;
PVW on gender ses age;
PVW on skill;
%BETWEEN classid%
PVB1 by PV1 PV2 PV3 PV4;
PVB1@1; [PVB1@0];
PVB1 on prosocial;
PVB1 on skill;
skill on prosocial;
%BETWEEN schoolid%
PVB2 by PV1 PV2 PV3 PV4;
PVB2@1; [PVB2@0];
PVB2 on climate prosocial skill;
skill on prosocial climate;
prosocial on climate;

However, I have got an error message:
Unrestricted x-variables for analysis with TYPE=THREELEVEL must be a variable on
only one level. The following variable cannot exist on more than one level:

Could you help me to fix this problem, please?

Thanks so much!

 Bengt O. Muthen posted on Friday, September 21, 2018 - 5:39 pm
A latent variable decomposition is not done with 3-level; you have to create the cluster variable yourself. If this doesn't help, send your full output to Support along with your license number.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message