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;