Two-level mediation analysis with bin... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Marina Milyavskaya posted on Friday, May 02, 2014 - 8:36 am
Hi, I am trying to test mediation using a 1-1-2 model where the outcome is binary. I specified the model following Preacher's syntax (see below) but with the outcome variable specified as 'categorical'. When I run the model, I get a number of error messages:

***ERROR in MODEL command
Observed variable on the right-hand side of a between-level ON statement must be a BETWEEN variable. Problem with: X1
(this is repeated for x1, x2, and M)
*** ERROR in MODEL command
Variances for between-only categorical variables are not currently defined on the BETWEEN level. Variance given for: U1
*** ERROR
The following MODEL statements are ignored:
* Statements in the BETWEEN level:
M ON X1
M ON X2
U1 ON M
U1 ON X1
U1 ON X2

When I run the same model but treat the outcome variable as continuous (which I know is inappropriate, but I just wanted to see whether it would work), I get a full solution and no errors. Any help would be appreciated!

relevant parts of syntax:
USEVARIABLES ARE subject x1 x2 m u1;
CLUSTER IS subject;
between are u1;
categorical = u1;
ANALYSIS:
TYPE IS TWOLEVEL;
%WITHIN%
m ON x1;
m on x2;
x1 with x2;

%BETWEEN%
u1;
m ON x1;
m ON x2;
u1 ON m;
u1 ON x1;
u1 ON x2;
x1 with x2;
 Linda K. Muthen posted on Sunday, May 04, 2014 - 4:45 pm
You can try putting a factor behind x1, m, and x2 on the between level and using the factor instead of the observed variable in the analsyis, for example,

f1 BY x1@1;
x1@0;

This makes the factor equal to x1.
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: