Message/Author |
|
Andrew Li posted on Sunday, January 20, 2019 - 7:35 pm
|
|
|
Hello, I have sort of a silly question. I am looking at the interaction between two L1 variables (X and Y). The slope is fixed. I want to see whether this relationship is moderated by M, which is a L2 variable. All of these variables are continuous variables. Is this the right syntax? usevariables = a1 x y m; cluster = a1; within = x; between = m; define: center x (groupmean); analysis: type = twolevel random; model: %within% sa| y on x; %between% y on m; sa on m; output: tech1 tech3; |
|
|
This syntax is correct. But I would not describe it the way you do. The slope is not fixed and there isn't an interaction between two L1 variables X and Y. Instead, you have an interaction between the L1 variable X and the L2 variable M in their influence on Y. |
|
Andrew Li posted on Monday, January 21, 2019 - 1:14 pm
|
|
|
Thank you Dr. Muthen. Just to make sure, the equation I am testing is the one that has all the components for an intercept-and-slopes-as-outcomes model except for u1jX (the interaction between X and the residual for the random slope on L2). |
|
|
Ok, then you have sa on m; with zero residual variance for sa. So you can add sa@0; So that slope is not fixed, nor random - I think it is sometimes called "varying". It is varying only as a function of m. |
|
Back to top |