Plotting interaction effects PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Kerstin Mertz posted on Wednesday, March 09, 2016 - 1:45 pm
Dear Sir or Madam,

I ran two-level models with random slopes and predictor variables on both levels and now I want to do simple slope analyses and plots for the significant interaction effects - among other things a cross-level interaction in which a predictor on level 2 moderates the regression of a criterion (measured on level 1) on a predictor on level 1. Embarrassingly, I have some problems figuring out how to do this correctly.
Firstly, I am quite confused if I should follow the example 9.2 in the user guide on page 264 or rather the example “cross-level effect plotted by LOOP” on the homepage – are they supposed to deliver the same plots?
Secondly, I do not understand where the variables “llevel” (or “mod”, respectively) in these examples come from –if they refer to the moderator variable, then why does one not use its real name?
Thirdly, regarding the example in the user guide, are these assumptions correct: I have to replace (a) the values -3 and +3 in the loop-command with the lowest and highest values of my moderator variable and (b) the values -1 and 1 in the definitions of “ylow” and “yhigh” with the standard deviation of my moderator variable – or rather the mean of this variable minus (or plus) the standard deviation?

I beg your pardon if these are stupid questions. I would be very grateful for your help!
 Bengt O. Muthen posted on Wednesday, March 09, 2016 - 5:05 pm
Not a stupid question. The plots display different things that you may be interested in. The plot that goes with ex 9.2 (second window) shows how the moderated effect varies with the level 1 x value for 2 different level-2 w values. The plot on our web page shows how the simple slope varies as a function of the level-2 moderator (so the level-1 variable isn't involved).

"level1" is a name you give for the x-axis. Although it represents the x variable, it is not the x variable. Same for "mod".

You wouldn't necessarily want to use the highest and lowest values but perhaps more common values like plus/minus 1 SD from the mean. Or, the 20th and 80th percentiles in the sample.
 Kerstin Mertz posted on Thursday, March 10, 2016 - 12:51 pm
Dear Prof. Muthén,
thank you very much for your helpful explanations!
As I want to test simple slopes I decided to follow the ex 9.2. But sadly my syntax does not work: MPlus gives me only an empty output. I would be very grateful if you would be so kind to tell me what I am doing wrong!

variable: usevariables = SCD_C SCD_T FATIG_T;
! FATIG_T corresponds to the criterion y in ex 9.2, SCD_T to the predictor x and SCD_C to the moderator variable w
cluster = VPN_NR;
within = SCD_T;
between = SCD_C;
define: center SCD_C (grandmean);
center SCD_T (groupmean);
analysis: type = twolevel random;
estimator = ml

model: %within%
SLOPE_2 | FATIG_T on SCD_T;
%between%
FATIG_T on SCD_C;
[SLOPE_2] (gam0) ;
SLOPE_2 on SCD_C (gam1) ;
FATIG_T with SLOPE_2;

model constraint:
new (y_mod_l y_mod_m y_mod_h);
plot (y_mod_l y_mod_m y_mod_h);
loop (xvar, -27, 34, 1)
! the predictor SCD_T ranges from -26.500 to 33.250
y_mod_l = (gam0 + gam1 * (-9.392)) * xvar;
y_mod_m = (gam0 + gam1 * 0) * xvar;
y_mod_h = (gam0 + gam1 * 9.392) * xvar;
! for the moderator SCD_C: mean = 0.00 and variance = 88.225
plot: type = plot2;
output: sampstat cinterval;
 Kerstin Mertz posted on Thursday, March 10, 2016 - 12:54 pm
I beg your pardon for the double post, but I am really not sure if the syntax above is the right approach for what I want to accomplish:
I want to plot and test a two-way cross-level interaction in which a predictor variable on level 2 (named SCD_C) moderates the regression of the criterion (FATIG_T) on a predictor variable on level 1 (SCD_T). On the x-axis there should be plotted the values of the predictor variable SCD_T and on the y-axis the values of the effect from SCD_T on the criterion FATIG_T adjusted for the influence of the moderator variable SCD_C.
I want three plot lines, namely the simple slopes for the regression of the criterion FATIG_T on the L1-predictor SCD_T for a low, a medium or a high value respectively of the moderator variable SCD_C.
As a “low” value I´ve chosen the value which represents one standard deviation below the mean of SCD_C, the “medium” value equals the mean of the moderator and the “high” value lies one standard deviation above the mean.

Thank you very much for your patience!
 Bengt O. Muthen posted on Thursday, March 10, 2016 - 3:09 pm
When the posts get this long, please send to Support instead along with your license number.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: