Message/Author 


Hi, I read most of the posts here & various articles on 211 models and how to add a L1 moderator for the b path (the 11 path) but I'm stuck. I have observations (data collected daily across 10 days) nested within individuals. I want to look at the effect of the IV (L2 continuous var) on the DV (L1 number of hours) via a mediator (level 1 continuous var) dependent on a L1 moderator (continuous var). Variables were centered in SPSS and a square root transformation was applied on the DV (sqy). I would highly appreciate any feedback on how to built/correct the syntax below to test my model. VARIABLE: NAMES ARE no Id y sqy ly lgy x gmx w gmw gmm Day; USEVARIABLES = Id sqy gmx gmm; Missing are all (99); BETWEEN IS gmx; CLUSTER IS Id; DEFINE: mw = gmm*gmw; ANALYSIS: TYPE IS TWOLEVEL RANDOM; MODEL: %WITHIN% gmm gmw sqy mw; sqy ON gmm (b1); mw(b2); gmw; gmm WITH gmw mw; gmw WITH mw; %BETWEEN% gmx gmm gmw sqy; gmm ON gmx(a1); sqy ON gmm; mw; gmw; gmx; gmx WITH gmw mw; gmw WITH mw; gmm WITH gmw mw; sb WITH gmx gmm sqy; [sb] bw; MODEL CONSTRAINT: NEW (b indb wmod); b = b1+bw; indb = a1 *b; OUTPUT: TECH1 TECH8 CINTERVAL; Laura 


You have some pieces that are not defined, such as [sb], bw, and b. You can get an indirect effect on Between from gmx to the betweenlevel latent part of gmm (your a1 label) to the betweenlevel latent part of sqy (which you didn't label). But the Within level part of the model is dangling, that is, it is not connected with the Between level, in particular the moderation by the mw term doesn't play into the full model. Perhaps instead you want to create the interaction between gmm and gmx on Between, using XWITH to deal with the latent gmm. 


Hi Bengt, Thank you for the quick reply! I have a followup question to make sure I understood you correctly. You suggested I add the interaction between gmm and gmx on Between but will this add the lower level moderation as well? That is the interaction between gmw and gmm on sqy (this is all in the within part of the model, correct?) Thank you again in advance! 


Okay, I got this far but then I get an error message saying that 'the b1 parameter is ambiguous'. Also, I still do not fully understand why would I need to have the interaction between gmm and gmx? If possible would you elaborate on this or indicate some articles that I can read to further understand this. Thank you!! VARIABLE: NAMES ARE no Id y sqy ly lgy x gmx w gmw gmm Day; USEVARIABLES = sqy gmx gmw gmm mw; Missing are all (99); BETWEEN IS gmx; CLUSTER IS Id; DEFINE: mw = gmm*gmw; ANALYSIS: TYPE IS TWOLEVEL RANDOM; MODEL: %WITHIN% gmm gmw sqy mw; mw(b3); sb  sqy ON gmw; gmw WITH mw; gmm WITH gmw mw; %BETWEEN% gmx gmm gmw sqy mw; [sb] (bw1); gmm ON gmx(a1); sqy ON gmm (b1); sqy ON gmw (b2); sqy ON gmm; sqy ON gmx (c); gmx WITH gmw mw; gmw WITH mw; gmm WITH gmw mw; MODEL CONSTRAINT: NEW (direct indirect ind1 ind2 ind3 ind4 mod); direct = c; indirect = a1 * b1; ind2 = a1 + bw1; mod = 1.77217; !+1SD ind3 = a1* (b1+b2*mod); ind4 = b3; OUTPUT: TECH1 TECH8 CINTERVAL; 


Your ambiguous message is because you say sqy on gmm twice on Between. It is hard for me to comment because I don't know your aim. I don't know why don't you have a mediation model on Within. And why you have a random slope that is not regressed on any betweenlevel predictor which would have given a crosslevel interaction. You originally said you had an L1 moderator but I don't see that reflected in your input. If sb was regressed on a betweenlevel predictor that predictor would be Betweenlevel moderator. Perhaps you can draw your model to clarify the intent, but you may need to get consulting. 


Firstly, thank you again for the quick response! I am not a statistician so I am probably not expressing my thoughts well. Here is the model: http://i.imgur.com/meWWw2f.png My aim and questions are whether it is possible to add a lower level moderation in a 211 model on the 11 path in Mplus and whether there are some examples of such models or models with lower level moderation only (I could not find this)? Below, I followed the syntax from Preacher et al. (2010, 2011) for the 211 model. I tried to add the lower level moderator and construct the indirect effects as in Model 3 (Preacher et al., 2007). The model below gave no errors in Mplus. I'm sharing it for learning purposes. I find this forum incredibly helpful in that respect! Thank you! USEVARIABLES = Id sqy gmx gmm gmw mw; Missing are all (99); BETWEEN IS gmx; CLUSTER IS Id; DEFINE: mw = gmm*gmw; ANALYSIS: TYPE IS TWOLEVEL RANDOM; MODEL: %WITHIN% sb  sqy ON gmm; mb  sqy ON mw; sqy ON gmw; %BETWEEN% gmm ON gmx(a); sqy ON gmm(b); sqy ON mw (b2); sqy ON gmx (c); sqy ON gmw; [sb](bw); [mb] (mbw); MODEL CONSTRAINT: NEW (bb indb bb2 indb2); bb=b+bw; indb=a*b; bb2=b2+mbw; indb2=a* (b+bb2); 


It seems to me that 1) you want the Preacher Model 3 on Level 1 (Within)  that gives you the moderation. 2) and then on between you have the mediation gmm on gmx; sqy on gmm; where gmm and sqy are the latent betweenlevel parts of those variables and gmx is a between variable. So, no need for random slopes in this approach. 


Dear Prof. Muthen, Thank you for the clarification and for the help! I ran this model in SPSS before with the steps from Baron and Kenny but switched to Mplus to be able to test the whole model at once. I was under the impression that random slopes are required when looking at variations in slopes between individuals, irrespective of whether the moderator is a within or a between variable. Am I correct then in saying that because my only between variable is my IV I do not need random slopes? Are random slopes required to be tested when there is variation in within variables relationship(s) that could be explained by between variables such as in cross level interaction? As for the model I was trying to estimate, am I correct in saying that I could analyse the indirect effect at various levels of the moderator by using the NEW command below in the model constraint part? I wrote the model with random intercepts only and I think it is okay now but please correct me if I am wrong. I could not construct the whole Model 3 on the within part since gmx is a between variable and I get an error. Thank you!! %WITHIN% gmw mw; sqy ON gmw; sqy ON mw (b2); %BETWEEN% gmx gmm sqy; gmm ON gmx (a); sqy ON gmm(b); sqy ON gmx; MODEL CONSTRAINT: NEW (indb1 indb2); indb1=a*(b+b2*1.53782); indb2=a*(b+b2*(1.53782)); 


First, your input doesn't show sqy ON gmm; on Within which your figure showed. Also, you have to ask yourself if your theory says that the moderation takes place on Within or Between? Your figure showed that it takes place on Within. Random slopes allow the moderation to be crosslevel, creating a product of a between variable (your gmx) and a within variable (your gmm). You can also have moderation on Between as I mentioned using inter  gmx XWITH gmw; I'm afraid that is all I can help you further with this  you might want to get statistical consulting. 


Dear Prof. Muthen, Thank you so much for the all the help! I will try to manage from here. Your advice is very helpful and much appreciated! Should I decide to get statistical consulting, where would you advise me to look for it? Once again thank you for all the time you invested in helping me with this! 


You can ask on SEMNET. 


Also, note the upcoming course taught by Preacher: Multilevel Modeling: A Second Course, Philadelphia, Pennsylvania, June 11  12, 2015 See our web site for more information. 


Dear Prof. Muthen, Thank you so much for the suggestions. Unfortunately, this is an urgent matter and I am afraid I will not be able to come to the US for the course although it would be fantastic if I could. I will try to self study this issue and hopefully manage. Once again thank you so much for your time and help! 

Back to top 