Cross level interaction PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 Xu, Man posted on Thursday, June 18, 2009 - 9:22 am
Dear Dr Muthen,

To test a cross level interaction, I include in the model a cross product term(X*Z) as the interaction term between a level 1 varaible(X) and a level 2 variable(Z). In this model the slope is fixed:

This way B2 is the interaction effect.

Another way might be to make the slop of X random such that a cross level interaction is present

Here B11 would be the interaction effect.

I found that the interaction effects in both methods are very similar, although there are slight difference in standard errors.

Could you advice me which way is better and why? And does the substantive interpretations of the interactions remain the same?

Thank you!
Xu, Man
 Linda K. Muthen posted on Friday, June 19, 2009 - 9:44 am
I would use the second way with BETWEEN=z; The first way doesn't have U1j.
 Xu, Man posted on Sunday, June 21, 2009 - 6:10 am
Yes. Thank you. In my model I didn't really specify any variable to be within or between.
I think the random slope approach is better for interaction of within and between variables because my z is a latently aggarated variable from a within level variable. If I used the product term I created from manifest group averages then the interaction effect probably won't be in agreement with the latent aggaration framework.
I also tried to "trick" a latent interaction by specifying a "xwith" term of one indicator variables at within and between level, but this idea didn't work at all.
 T Davis posted on Wednesday, November 03, 2010 - 7:55 am
Drs. Muthen -

This is a very helpful post. I have a few questions.

What would the model command look like? I am not sure how the X*Z interaction is modeled. In the User's Guide ex. 9.1 it appears that the X*Z interaction is represented as xm. Is this correct? So for a random intercept model with two cross-level interactions, the MODEL command would look like:

y on x1 x2

y on w x1m x2m

Can this be modeled in version 5.1?

Thank you.
 Linda K. Muthen posted on Wednesday, November 03, 2010 - 12:40 pm
A cross-level interaction is modeled when you have a random slope as shown in Example 9.2. See Slide 45 of the Topic 7 course handout on the website to see how this plays out. I think this was available in Version 5.1.
 Hanna de Vries posted on Tuesday, July 26, 2016 - 11:30 pm
I am quite new to mplus and tried to compute an interaction effect (with all day variables). Data is based on diary studies of 5 five days (days within nested in persons). However, when I define a interaction effect based on effect HNW * pros I got a message that this variable is not recognized.

Within = Pros;
Cluster = ID;
I = HNW*Pros;

Com on Pros I;

 Linda K. Muthen posted on Wednesday, July 27, 2016 - 6:34 am
Please send the output and your license number to
 Hailey Lee posted on Wednesday, February 06, 2019 - 5:35 pm
Dear Bengt/Linda,

I am trying to fit a 3-level model with an interaction between a level 3 and a level 1 variable. The predictor (mfcond) is a L3 variable, outcome (p1d1) is a L1 variable, and the moderator (gender) is a L1 variable. The model runs fine, but does the code make sense?

cluster=session mf;
within=gender age mrace
pincome pedu perisk pcrisk P0D1;
Define: center age mrace pincome pedu perisk pcrisk P0D1(grandmean);
center gender (groupmean session);

Analysis: type=threelevel random;

Model: %within%
P1D1 ON P0D1 age mrace pincome pedu perisk pcrisk;
s| p1d1 on gender;

%between MF%

%between session%
P1D1 S on mfcond;
p1d1 with s;
 Bengt O. Muthen posted on Thursday, February 07, 2019 - 5:31 pm
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message