Multi-level mediation analyses with b... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Li C NRI posted on Wednesday, November 21, 2012 - 9:41 am
Dr.Muthen,

I tried to run a 2-1-1 mediation model, in which x and m are continuous , and y is binary variable. Below is my syntax for that model:

TITLE: 2-1-1 Mediation MSEM

DATA:
FILE IS MEDIATION.dat;


VARIABLE:
mMES ARE ID y x m yMEAN mMEAN;
USEVAR = ID y x m yMEAN mMEAN;
CLUSTER is ID;
MISSING ARE ALL BLANK;
CATEGORICAL is y;


BETWEEN ARE x mMEAN yMEAN;

AmLYSIS:
TYPE IS TWOLEVEL RANDOM;
STARTS 200 50;

MODEL:
%WITHIN%
m y;
y ON m (b) ;
%BETWEEN%
x mMEAN yMEAN;
mMEAN ON X(a) ;
yMEAN ON mMEAN(b);
yMEAN ON x ;
MODEL CONSTRAINT:
NEW(indb);
indb=a*b;
OUTPUT:
TECH1 TECH8 CINTERVAL;

I got the error message:
*** ERROR in MODEL command
Variances for categorical outcomes are not allowed on the within level.
Variance given for: y

Is my syntax correct? Should I delete the categorical command?

thank you.
 Bengt O. Muthen posted on Wednesday, November 21, 2012 - 4:06 pm
The error message says it all: delete "y" in your statement

%WITHIN%
m y;
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: