

Interaction in MLM Mplus 8 on Mac 

Message/Author 


Hi, I am running a multilevel model with twolevels with one interaction term at the withinlevel. I need to present two plots: a) simple slopes with slopes at 2SD, mean, +2SD of the moderator, with my x variable on the xaxis and three slopes (M) and b) a JohnsonNeyman (limits 2SD, +2SD) From what I've read from examples and the forum, I have added to my MPLUS script: MODEL CONSTRAINT: Plot(ss); Loop (mod,2,2,0.1); ss = a+b*mod; This script gives me a gh5 file for R (I am working on a Mac), but when I put it into R, it produces a plot with one slope plus LCI/UCI with the moderator on the Xaxis. I think that it's an error in my Mplus part of the process but am not sure. Can you help?! Many thanks! 


I don't know what you mean by "and three slopes (M)". What I think you want is 2 plots as a function of x for simple slopes at certain values (2, +2) of the moderator: Plot (ss1 ss2); Loop (x, low, high, 0.1); ss1 = (a+b*(2))*x; ss2 = (a+b*(+2))*x; 


Thank you very much. I can see that this is better, but it's still not quite solved! I'm sorry I wasn't clear. I need to have one plot where my DV is on the yaxis, my IV on the xaxis and slopes are as a function of +/2SD of moderator. But what this suggests is that perhaps it's my R that's incorrect. Which is likely as I don't know it! I'm using mplus.plot.loop('file.gh5') and it gives ss1 on the yaxis. Many thanks! 

Back to top 

