I read most of the posts here & various articles on 2-1-1 models and how to add a L1 moderator for the b path (the 1-1 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;
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 between-level latent part of gmm (your a1 label) to the between-level 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.
Thank you for the quick reply! I have a follow-up 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?)
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;
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 between-level predictor which would have given a cross-level 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 between-level predictor that predictor would be Between-level 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 2-1-1 model on the 1-1 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 2-1-1 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!
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);
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));
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 cross-level, 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.
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!