Interaction between two Level-one var... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Andrew Li posted on Friday, January 26, 2018 - 9:52 am
Hello Dr. Muthen,

I try to model the interaction between two level-one variables (X and M), with M being the moderator, on a level-one DV (Y). This model allows random slope and intercept. is this the right code? Thank you.

Missing = all(999);
Usevariables = x m y inter;
cluster = a1;
within = x m inter;
define:
inter = x * m;
analysis: type = twolevel random;
model: %within%
Jake | y on x; !jake is arbitrary, so are jake1 and jake2
jake1 | y on m;
jake2 | y on inter;
%between%
y with jake;
y with jake1;
y with jake2;
output: tech1 tech3;
 Bengt O. Muthen posted on Friday, January 26, 2018 - 2:19 pm
Looks fine. But you have only 3 WITH statements on Between - there should be 4*3/2 =6.
 Andrew Li posted on Friday, January 26, 2018 - 2:23 pm
Thank you Dr. Muthen. Are these the missing WITH statements?

Jake with Jake1;
Jake with Jake2;
Jake1 with Jake2:
 Bengt O. Muthen posted on Friday, January 26, 2018 - 4:06 pm
Right. But you can simply say

y jake-jake2 with y jake-jake2;
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: