Message/Author 


Dear Linda and Bengt Muthen, I really appreciate the easy and intuitive way of analyzing multilevel data with Mplus. Yet, in the moment I am facing a problem I don't know how to handle: I would like to know whether the association of two level1 variables influences a level2 variable. Thus, I somehow need to save the random slopes to use them in a following analysis. Is there a command that allows me to do that or alternatively, is there any other way to solve this problem without saving the random slopes? Thank you very much! Best, Heidi 


You can do that in one step using the model: %Within% s  y on x; %Between% z on s; 


Dear Bengt, thank you very much for the quick response. I didn't know that this would be a valid model, as I cannot think of a reasonable underlying equation... For %Within% s  y on x; %Between% s on z; it should be yij =beta0j +beta1j(xij)+rij beta0j =gamma00 +gamma01(zj)+u0j beta1j =gamma10 +gamma11(zj)+u1j ...but is it still possible to form a single (complex) equation when exchanging s with z on level2? Thanks again so much for helping me with this probably quite uncommon request. 


Yes, that's the strength of Mplus. Most multilevel programs can handle a random effect such as beta1j only on the lefthand side of the equations but Mplus allows it to also be on the righthand side. So for example %Within% s  y on x; %Between% y on z;! y is the random intercept z on s; translates to yij =beta0j +beta1j(xij)+rij beta0j =gamma00 +gamma01(zj)+u0j zj = gamma10 + gamma11(sj)+u1j 

Jiangang Xia posted on Thursday, December 01, 2016  9:58 pm



Dear Bengt, Thank you for your example. I am considering the same thing: using a random slope to predict some other outcomes. It is great to know that Mplus allows using slope as a predictor. My question is, how about a crosslevel slope? For example, the relationship (s) between principals factor (x) and teachers factor (y). Could we model the effect of s on teacher job satisfaction (J)? If so, how could I write the code and translate to equations? Do you have any other examples or publications on this topic? Thanks. 


If I understand you correctly I am not convinced this makes sense. Using your example, your x (a between/principals vble) influencing your y would have to refer to the between part of y, that is, this is a betweenlevel regression. Its slope s does not vary because it is a betweenlevel regression. So s is not a variable and cannot therefore not influence the between part of J. 


I understand your concern. Forgot to mention that I have to add a third level so the slope could vary between third level units such as school districts. I asked the question in another post and you replied that "If you have 3level modeling a random slope defined on level 2 can be used to predict outcomes on level 3." This makes sense to me but is it also ok to model the slope's effect on outcomes at level 1 or level 2? Since the slope is actually a level 3 variable, I believe it could predict lower level outcomes. Do you know any publications on this kind of model? Thanks. 


Answered elsewhere. I am not aware of publications on this. 

Back to top 