1-1-1 model with a L-1 and a L-2 cont...
Message/Author
 Andrew Li posted on Tuesday, February 07, 2017 - 1:54 pm
Hello, I am an Mplus newbie. Your guidance is greatly appreciated. I want to fit a 1-1-1 model (X-M-Y) with a level-1 control (c1) and a level-2 control (c2) both regressing on the Y variable. Can you please see the code below to see whether the lines related to the controls are correct? Thank you.

Usevariable = ID x m y c1 c2; !c1 is an individual-level (level-1) control and c2 is a group-level (level-2) control
CLUSTER = ID;
within = x c1;
between = c2;
ANALYSIS: TYPE = TWOLEVEL RANDOM;

MODEL:
%WITHIN%
sa| m on x;
sb| y on m;
sc| y on x;
y on c1;
%between%
[sa] (a);
[sb] (b);
[sc] (cp);

m with y;
m with sa sb sc;
y with sa sb sc;
y on c2;
sa with sb (covab);
sa with sc;
sb with sc;

MODEL CONSTRAINT:
NEW (direct indirect);
indirect=a*b+covab;
direct = cp;

!OUTPUT: TECH1 TECH8 CINTERVAL;
 Bengt O. Muthen posted on Wednesday, February 08, 2017 - 2:25 pm
Looks right. But perhaps c2 is not unrelated to m and the s's on between.
 Andrew Li posted on Wednesday, February 08, 2017 - 2:36 pm
Dear Dr. Muthen, thank you so much for your response. I guess I am not completely sure what you mean by "But perhaps c2 is not unrelated to m and the s's on between." Would you please explain what you mean? Are you suggesting that I include the followings in the %between% statement?
m sa sb sc on c2!
 Bengt O. Muthen posted on Wednesday, February 08, 2017 - 2:43 pm
Yes, for instance.