Cross-level and between-group interac... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Oli Christ posted on Thursday, August 25, 2005 - 3:15 am
I have a multi-level example where I expect the relationship between two individual-level variables to be moderated by a group-level variable (one that varies only between-groups). Can I test this hypothesis using M-Plus? The handbook seems to suggest that currently M-Plus cannot handle cross-level interactions. However, I would like to take advantage of M-Plus's group-mean centering options to decide whether I am dealing with a cross-level interaction or a between-group interaction.
 Linda K. Muthen posted on Thursday, August 25, 2005 - 8:56 am
I think you will get the results you want by the following partial setup:

WTIHIN = x;
BETWEEN = w;
MODEL:
%WITHIN%
s | y ON x;
%BETWEEN%
s ON w;
 Christian Geiser posted on Friday, June 16, 2006 - 2:42 am
I would like to estimate a path model with manifest variables in which a variable that varies within as well as between clusters (i.e., intelligence) is regressed on intelligence measured at an earlier time point and several other variables that vary ONLY between clusters (school classes) but are constant within clusters (i.e., variables such as class climate etc.). Furthermore, several of these cluster-level variables are supposed to be connected to other cluster level variables via regression or covariance paths. I am not sure if and how such a model can be specified in Mplus? It would be great if you could provide an appropriate example input code. Thank you very much.
 Bengt O. Muthen posted on Friday, June 16, 2006 - 8:06 am
Here is an example. Note that on the between level, y1 and y2 are the between parts of intelligence.

Between = w1 w2 w3;

Model:

%within%

y2 on y1;

%between%

y2 on y1 w1-w3;
w3 on w2;
w2 on w1;
 Andrew Dwyer posted on Thursday, June 29, 2006 - 4:56 pm
I have a multi-level analysis in which I have between-level dependent variable that needs to be regressed on a few within-level predictor variables, as well as a few between-level predictor variables (all variables are manifest variables). I'm not sure if the MPlus code that I am currently using is correct, so could you possibly give me an example of the setup file that could handle this analysis?
 Bengt O. Muthen posted on Sunday, July 02, 2006 - 5:16 am
I think you mean that you want to regress a between-level variable on the between part of a within-level variable. This can be done by not putting the variable on the WITHIN list. See Chapter 9 for multilevel examples.
 jan posted on Thursday, March 08, 2007 - 10:57 am
I'm new to multilevel modeling and maybe my question is simple, but I didn't find the answer, yet.

I need to predict an individual-level variable (self-concept) by another individual-level variable (achievement) as well as by the aggregated level of the latter one (class achievement). Doing the following is wrong, of course, because then I'll have a between level self-concept.

%within%
self ON achiev;
%between%
self ON achiev;

What I need is something like:
self ON indiv_achiev class_achiev

So, I'm wondering how to perform this in Mplus.

Thank you very much.
 Bengt O. Muthen posted on Thursday, March 08, 2007 - 11:21 am
The standard multilevel approach is to say that the influence of class-level achievement on self-concept is through the class-level part of self-concept (the class-level part of self-concept is of course a part of the student's self-concept score). The class-level part of self-concept is the random intercept of students' self-concept regressed on achievement. In other words, your Mplus setup is correct.
 jan posted on Thursday, March 08, 2007 - 12:44 pm
Dear Mr. Muthen,
thanks for your quick answer. I understand your point, but I don't think that it solves my problem.
I want to research the big-fish-little-pond-effect, which supposes that students' individual self-concept correlates positiv with their individual achievement and negativ with class-average achievement. Several studies found this effect using HLM-Models with class-average achievement as a level-2 predictor and individual achievement as a level-1 predictor for students' self-concept both times on level-1, I think (e.g. Lüdtke et al. 2005 in Contemporary Educational Psy; Marsh et al. 2000 in JPSP).
I am not dealing with HLM but with Mplus, so I hope to find this effect using Mplus. Maybe I made a big error in reasoning, but I'm still looking for the solution. A misunderstanding in my first message might have been that I talked about aggregated class achievement and not class-average achievement.
I would be very grateful for another idea.
 Bengt O. Muthen posted on Thursday, March 08, 2007 - 4:18 pm
Let's see if we can understand each other more fully. In the HLM model references you refer to, I would guess that they do what corresponds to the random intercept model in Mplus:

%within%
self ON achiev;
%between%
self ON achiev;

- except that their between-level covariate is aggregated class achievement rather than the latent variable score that Mplus produces (the difference is probably not large) - and you can do that in Mplus. You can have a positive beta on within and a negative beta on between.

But are you saying that you don't find this HLM-type approach sufficient?
 jan posted on Friday, March 09, 2007 - 3:41 am
I find this HLM approach sufficient. I just wanted to say, that I've no access to the HLM-software, but I'd like to find the bflpe (see my prior message) in my data using Mplus.

So, what Marsh et al. did is the following:
self = b0 + b1*achiev_ind + r (level 1)
b0 = g00 + g01*achiev_class + u0 (level 2)
b1 = g10 + g11*achiev_class + u1 (level 2)

I think this in your short course (day 5) on slide 24 ff. So I tried the following in Mplus:
%within%
s | self ON achiev;
%between%
self s ON ach_class;
self with s;

Doing this, I get following error message:

...PROBLEM INVOLVING VARIABLE SELF. THE RESIDUAL CORRELATION BETWEEN S AND SELF IS -1.001

Am I - aside from the error message - on the right track, now? Should I fix the variance of s with self to 0 (I'm not familiar with fixing variances)? Doing this, I get another error:

... THE VARIANCE OF S APPROACHES 0. FIX THIS VARIANCE AND THE CORRESPONDING COVARIANCES TO 0, DECREASE THE MINIMUM VARIANCE, OR SPECIFY THE VARIABLE AS A WITHIN VARIABLE.
 Boliang Guo posted on Friday, March 09, 2007 - 3:55 am
self with S mean the corelation of intercept of self with slop, do you wanna know this correaltion?
for higher corelation between slop and slop, we always center X before run the model, try center X to see what will happen
well, since veriance of S approach 0(not statistically significant?), it means the slop is not random among level 2 units, if yes, you should run a random intercept only model if the intercept is random, if level 2 variance of self is also not statistically significant, then, just run an OLS regression.
 Bengt O. Muthen posted on Friday, March 09, 2007 - 6:24 am
I would try a random intercept only model first, so get rid of the random slope. This means using the input

%within%
self ON achiev;
%between%
self ON ach_class;
 jan posted on Monday, March 12, 2007 - 3:13 am
Thanks again, this worked - even though I didn't get different directions for the two beta.
 Seung Bin Cho posted on Monday, May 21, 2007 - 1:09 pm
I'm posting my question here since it's closely related with questions posted on this thread.

I have a set of HLM equations that I want to run with Mplus.
It's a 3-level growth model(time points ?individual ?classroom)
Level 1: Yijt = P0ij + P1ij*Time + eijt
Level 2: P0ij = B00j + B01j*HRisk + r0ij
P1ij = B10j + B11j*HRisk + r 1ij
Level 3: B00j = G000 + G001*ECredit + u00j
B01j = G010 + G011*ECredit + u01j
B10j = G100 + G101*ECredit + u01j
B11j = G111 + G111*ECredit + u11j

continued on the next post...
 Seung Bin Cho posted on Monday, May 21, 2007 - 1:12 pm
My model statement is as follow:
model:
%within%
iw sw| selfc@0 selfc2@1 selfc3@2 selfc4@3;
selfc selfc2 selfc3 selfc4 (1);
b01| iw on HRisk;
b11| sw on HRisk;
%between%
ib sb| selfc@0 selfc2@1 selfc3@2 selfc4@3;
ib sb on ECredit;
b01 on ECredit;
b11 on ECredit;
selfc@0 selfc2@0 selfc3@0 selfc4@0;

I put the | statements to estimate the cross-level interactions.
I wonder if it's correct code. I looked at the examples in the manual, but it was not clear that I need | statements.
Thank you for any help.
 Linda K. Muthen posted on Monday, May 21, 2007 - 5:47 pm
This looks correct. Please keep posts within the size limitation.
 Dan Feaster posted on Wednesday, May 14, 2008 - 10:18 am
I am trying to estimate a cross-level interaction with a latent variable score for the X variable at level 2(i.e. my X variable is defined at both within and between):
%within%
rshas| pstmd_1 ON has_1;

%between%
pstmd_1 rhas ON has_1;
rhas=0;
Whether I free the random coefficient's variance or not I get errors like:
"THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO A NON-ZERO DERIVATIVE OF THE OBSERVED-DATA LOGLIKELIHOOD." OR "THE LOGLIKELIHOOD DECREASED IN THE LAST EM ITERATION."
Is this just 1)numerical problem with my data or 2) is this not possible in Mplus, at this time or 3) theoretically not possible (and I need to dig into the algorithm more)? I have no problem if I make this the calculated between-level variable at level 2.
 Linda K. Muthen posted on Wednesday, May 14, 2008 - 11:03 am
Given the information that you provide, it sounds like it is something specific to your data and the model. Please send your input, data, output, and license number to support@statmodel.com so we can see the full picture.
 chris lo posted on Tuesday, July 08, 2008 - 9:23 am
I have repeated measurements over time (e.g., depression scores and pain scores) for a group of individuals. I also have some variables which were measured only once at study entry (e.g., personality trait scores and gender).

I am running a multilevel model in which I am predicting the depression scores based on time and pain (level 1 variables). I have also entered the personality trait and gender variables as predictors (level 2 variables). My question concerns the specification of cross-level interactions. Does a level 1 (repeated) variable have to be set as a random effect before I can enter in an interaction involving it and a level 2 variable?

Thank you for any help with this.
 Linda K. Muthen posted on Tuesday, July 08, 2008 - 10:12 am
Yes, this is how it is done. See Example 9.2.
 M Hamd posted on Thursday, April 01, 2010 - 5:06 pm
I am trying to explore cross-level effects. Here is the case: x leads to y (at level 1)
x leads to M which leads to y (at level 2)
M also moderates the relation between "x and y" at level 1. Is the following code correct?

BETWEEN = M;
MODEL:
%WITHIN%
s | y ON x;
%BETWEEN%
M on x;
s Y ON M;
 Linda K. Muthen posted on Thursday, April 01, 2010 - 5:40 pm
Cross-level interactions are obtained using a random slope model like the one you have specified. See Example 9.2 for further information and Slide 45 of the Topic 7 course handout.
 Artur Pokropek posted on Friday, September 10, 2010 - 5:25 am
Hallo,

I've question about between level interaction. Suppose I'v got simple multilevel path model with random intercept:

WITHIN ARE w x*z;

%WITHIN%
y on x z x*z;
x z on w;

where x*z is interaction term.
I want to replicate this structure on between level. To have:

%BETWEEN%
y on x z x*z;

the problem is that I could not use XWITH option to specify interaction x*z on between level because x and z are not seeing as latent variables. Should I prepare aggregate variable with is interaction between clusters means of x and z or is it possible to do it in Mplus directly in the model?

Best regards
Artur
 Linda K. Muthen posted on Friday, September 10, 2010 - 9:38 am
Do you want a cross-level interaction of a within variable x with a between variable z or do you want to create an interaction term to use on the between level.
 Artur Pokropek posted on Friday, September 10, 2010 - 9:44 am
The second option. I want to create an interaction term to use on the between level.
 Linda K. Muthen posted on Friday, September 10, 2010 - 2:24 pm
Are you going to use observed variables on within and between or are you going to use a latent variable decomposition of the variable. See Example 9.1 for an explanation of these two approaches.
 Artur Pokropek posted on Friday, September 10, 2010 - 10:34 pm
I try to have latent decomposition of two variables x and z and interactions between those latent parts on between level.
 Linda K. Muthen posted on Saturday, September 11, 2010 - 9:33 am
Do not put x and z on the WITHIN list and use the following for the between part of the MODEL command:

$BETWEEN%
fx BY x; x@0;
fz BY z; z@0;
xz | fx XWITH fz;
y ON fx fz xz;
 Lisa M. Yarnell posted on Friday, March 11, 2011 - 1:29 pm
Hello,

I am trying to analyze a model with a cross-level interaction, with a one-between (BEAT), one-within (AGG) design.

I tried the following code:
WITHIN = beat ;
BETWEEN = agg;
CLUSTER = subj;
DEFINE: beat_agg = beat * agg;
ANALYSIS: TYPE = TWOLEVEL RANDOM;
ALGORITHM = INTEGRATION;
MODEL:
%WITHIN%
s | trusty ON beat ;
%BETWEEN%
trusty ON agg;
s on agg;

This gave an error mesage: THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO A NON-ZERO DERIVATIVE OF THE OBSERVED-DATA LOGLIKELIHOOD.

I think the solution would be to fix the slope, using s@0.

However, this gives the message:
SERIOUS PROBLEM IN THE OPTIMIZATION WHEN COMPUTING THE POSTERIOR DISTRIBUTION. CHANGE YOUR MODEL AND/OR STARTING VALUES.

Can you give any advice on how to get this model to run?
 Linda K. Muthen posted on Monday, March 14, 2011 - 4:25 pm
Please send the files and your license number to support@statmodel.com.
 Patchara Popaitoon posted on Tuesday, March 15, 2011 - 4:22 am
Hi,

I would like to know how to set up the data for multilevel analysis. I have a unit level construct (team environment) with its measure is referring to the team environment but these survey items are reported by indivduals within the team. So, it is the unit level construct. In my case, I have 200 teams with 4-5 team members each. I wonder if I should aggregate the data from individual level to the unit level and treat this construct as the variable in the 'between' group command. Please advise. Thanks.
 Linda K. Muthen posted on Tuesday, March 15, 2011 - 11:02 am
See the following paper which is available on the website:

Lüdtke, O., Marsh, H.W., Robitzsch, A., Trautwein, U., Asparouhov, T., & Muthén, B. (2008). The multilevel latent covariate model: A new, more reliable approach to group-level effects in contextual studies. Psychological Methods, 13, 203-229.
 Katy Roche posted on Thursday, May 26, 2011 - 9:25 am
I am trying to test interactions while accounting for clustering (these are NOT cross-level interactions)...the clustering is only being accounted for in order to obtain correct standard errors.

With clustered data and tests of interactions, it is correct to specify: TYPE=COMPLEX and ALBORITHM=INTEGRATION? I am wanting to compare my results from the models accounting for clustering to those that did not -- in those models I specified TYPE=RANDOM.
 Linda K. Muthen posted on Thursday, May 26, 2011 - 10:57 am
You need to specify TYPE= COMPLEX RANDOM. This can be used with ALGORITHM=INTEGRATION.
 Katy Roche posted on Thursday, May 26, 2011 - 11:05 am
Thank you -- that did it. One more related question. When I run this same model without the interactions I get the error message that others have posted before (see below) and am curious to know why this would NOT be a problem in the model testing interaction effects.

Do you suggest I need to run a Montecarlo for the main effects structural model or am OK to rely on results despite this message? Nothing in results looks very different from teh model that does not account for clustering.

THE MODEL ESTIMATION TERMINATED NORMALLY

THE STANDARD ERRORS OF THE MODEL PARAMETER ESTIMATES MAY NOT BE TRUSTWORTHY FOR SOME PARAMETERS DUE TO A NON-POSITIVE DEFINITE FIRST-ORDER DERIVATIVE PRODUCT MATRIX. THIS MAY BE DUE TO THE STARTINGVALUES BUT MAY ALSO BE AN INDICATION OF MODEL NONIDENTIFICATION. THE CONDITION NUMBER IS -0.234D-PROBLEM INVOLVING PARAMETER 33.

THIS IS MOST LIKELY DUE TO HAVING MORE PARAMETERS THAN THE NUMBER OF CLUSTERS MINUS THE NUMBER OF STRATA WITH MORE THAN ONE CLUSTER.
 Katy Roche posted on Friday, May 27, 2011 - 8:42 am
In thinking about the problem I am running into with this error message for the main effects model (not interaction effects model)accouning for clustering, I redid analyses and specificed

TYPE = COMPLEX RANDOM;

in the main effects model. In that case, I do not get the error message. Of course, I also do not get standardized estimates that I want. So, I guess I am still wondering if I am OK to report coefficients from the main effects model accounting for clustering (TYPE=COMPLEX) despite the error message.
 Bengt O. Muthen posted on Friday, May 27, 2011 - 4:48 pm
I think you are, but only a Monte Carlo study could show it clearly.
 kirsten way posted on Friday, October 21, 2011 - 10:46 pm
Hi,

I'm trying to plot my significant cross level interaction using preacher's calculator. I've requested TECH3 in the output to get the coefficient covariances, but wanted to ask - how do I ascertain what variables the parameter numbers in the printout refer to?

Thank-you!
 Linda K. Muthen posted on Saturday, October 22, 2011 - 6:29 am
They refer to the parameter numbers in TECH1.
 MT posted on Monday, February 27, 2012 - 6:18 am
Dear Linda,

I am trying to model the following paths:

At the within-level, I have one predictor (strucjr) and a dependent variable (bevl). This relationship is maybe moderated by a level-2 variable (Tafh).

At the between-level, I have one predictor (Tstrucjr) and a dependent variable (Tbevl). This relationship may be moderated by a second level-2 variable (Tauto).

I have the following syntax but am not sure how to model the between-level moderation. Could you please help me with this?

CLUSTER IS Team;
BETWEEN IS Tafh Taut Tbevl Tstrucjr;
WITHIN IS StrucJR;
Centering = Grandmean (Tafh Taut);
Centering = Groupmean (StrucJR);

USEVARIABLES ARE
StrucJR Bevl Tafh Taut Tstrucjr Tbevl;

ANALYSIS:
TYPE = TWOLEVEL RANDOM;
ESTIMATOR = ML;
ALGORITHM = INTEGRATION;

MODEL:
%WITHIN%
s | Bevl ON StrucJR;

%BETWEEN%
s Bevl ON Tafh; !cross-level interaction
Tbevl ON Tstrucjr;
! between-level interaction?

Thank you so much in advance!
 Linda K. Muthen posted on Tuesday, February 28, 2012 - 10:30 am
You can use the DEFINE command to create the between-level interaction terms.
 Jan Eichhorn posted on Monday, March 05, 2012 - 1:55 am
Hello,

I am estimating a multilevel path model and estimate a cross-level interaction effect. When doing that, I cannot specify the direct effect of the level-1 predictor on the dependent any more. In non-SEM Multilevel models that usually is still possible - I would be grateful if you could let me know how I might be able to specify the direct effect of the level-1 predictor despite also estimating the cross-level interaction.

The relevant part of the model (there are some paths and covariates at the individual level) reads

%Between%

I ON A_SocCap;
LifeSat ON A_SocCap;

%Within%

I | LifeSat on DV_U;

So essentially my question is whether I can estimate the direct effect of DV_U on LifeSat at level-1 still or whether that is not possible in a ML SEM.

Thank you very much for your help!!
 Linda K. Muthen posted on Monday, March 05, 2012 - 8:59 am
Do you mean the direct effect LifeSat on DV_U? You specify this on within as a random effect. The mean and variance of this random effect are found on between.
 Jan Eichhorn posted on Monday, March 05, 2012 - 9:30 am
Dear Linda,

thank you very much - I forget that I get the mean estimated and that it would be that of course.

Thanks for your quick help!
Best wishes
 Patchara Popaitoon posted on Thursday, March 08, 2012 - 11:29 am
Dear Linda,

I have specified a cross-level effect model investigating employee perceptions at the individual level and their impact on the group level performance. The model is:

%within%
B on A;
%between%
C on B;
D on C;

The results are fine but the journal reviewers would like to know if we can identify the impact of A on C and D.

Thanks.
Pat
 Linda K. Muthen posted on Thursday, March 08, 2012 - 1:47 pm
To estimate cross-level interactions between A with C and C, you need a random slope model. See Example 9.2 in the user's guide.
 Patchara Popaitoon posted on Wednesday, March 14, 2012 - 4:51 am
Dear Linda,

Thanks for the advise on using a random slope to explain the corss-level interactions.

I have questions about the model specification provided in Example 9.1.

I would like to know how the grandmean (x) contributes to the analysis. There are both x and xm which already represent x variable in the within and between levels.

The other question is I wonder if we can assume that the system refer to random intercept y to represent y in the between part of the model if we use latent variable y in the within level.

Thanks.
Pat
 Linda K. Muthen posted on Wednesday, March 14, 2012 - 2:50 pm
Centering x is not necessary. It sometimes helps in interpretation to have a variable with mean zero.

y is not on the WITHIN list so y is a random intercept on the between level.
 joon hyung park posted on Thursday, March 22, 2012 - 9:16 am
Dear Linda,

I am testing the moderating effects of coping (AVO) between stressor (AS) and outcome (PD).

I ran it with following codes.
USEVARIABLES ARE SV_ID AS_1 PD_1 AVO_1 AS_AVO;
WITHIN are AS_AVO;
CLUSTER = SV_ID;

ANALYSIS: TYPE = TWOLEVEL random;
ALGORITHM=INTEGRATION;

! AVOIDANCE coping
MODEL:
%WITHIN%
PD_1 on AS_1; ! pd=psychologcial distress
PD_1 on AVO_1;
PD_1 on AS_AVO;

%BETWEEN%
fx by AS_1; AS_1@0;
fz by AVO_1; AVO_1@0
xz | fx XWITH fz;
PD_1 on fx fz xz;

I received...

*** WARNING in MODEL command
In the MODEL command, the following variable is a y-variable on the BETWEEN
level and an x-variable on the WITHIN level. This variable will be treated
as a y-variable on both levels: AS_1
...
as a y-variable on both levels: AVO_1
2 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS

THE ESTIMATED BETWEEN COVARIANCE MATRIX COULD NOT BE INVERTED.
COMPUTATION COULD NOT BE COMPLETED IN ITERATION 106.
CHANGE YOUR MODEL AND/OR STARTING VALUES.

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO AN ERROR IN THE
COMPUTATION. CHANGE YOUR MODEL AND/OR STARTING VALUES.


Could you me any suggestions?
 Linda K. Muthen posted on Thursday, March 22, 2012 - 12:52 pm
Please send the output and your license number to support@statmodel.com.
 Paraskevas Petrou posted on Tuesday, May 15, 2012 - 8:14 am
Dear Linda,

I am working on a model with 3 cross-level interactions predicting 3 within-level outcomes, resulting in 6 tested random slopes. I am following example 9.2 of the guide. This example has two alternative options. In the first alternative you specify:
y s ON w xm (between level)
And in the second alternative you specify:
y s ON w x (between level)

In my example I am interested to see if the moderator (w) explains the relationship from x to y (specified at the within level). So I can't see why I would include x or xm in this two statements above. Can I skip that completely and simply say the following:
y s ON w (between level) ?

When I do this, though, I cannot interpret my results. At the within level I can only see residual variances and corelations. If I know the estimate from w to s, don't I also need to know the estimate from x to y at the within level in order to interpret the pattern of my interaction?
 Bengt O. Muthen posted on Tuesday, May 15, 2012 - 6:33 pm
You don't need to include x or xm, but often these "contextual" variables have a significant influence on between.

When you have a random slope s and regress it on w (cross-level interaction) you estimate this regression's intercept, slope, and residual variance. The slope gives the interaction effect. You can think of the intercept as the influence of x on y at w=0.
 Paraskevas Petrou posted on Wednesday, May 16, 2012 - 12:30 am
Thank you for your reply, Bengt.

So if I understand correct the intercept of the slope shows the main effect of x to y (irrespective of w). How can I interpret the pattern of my interaction, though? Do I need to make a plot or can I interpret it directly from my findings?

I assume that in order to have a significant interaction the path from w to s needs to be significant. In my example, the intercept of the slope is non-significant. If the path from w to s is positive significant, does it mean that x to y becomes positive for high levels of w?

Best,
Paris
 Bengt O. Muthen posted on Wednesday, May 16, 2012 - 10:40 am
If you center w, the intercept is the effect of x to y at the w mean. Your sample statistics tell you what the SD of w is, so that you can evaluate the effect of x on y at say -1 SD and +1 SD away from the w mean.

Yes, a significant interaction happens when the influence of w on s is significant. The sign and value of the influence of x on y for different values of w is obtained as in my first paragraph.

You may also want to study this topiic in multilevel books such as Raudenbush-Bryk.
 Sarah Lindstrom Johnson posted on Wednesday, May 23, 2012 - 1:23 pm
We are trying to examine cross level interactions (i.e., s1 s2 on M032MNRT;) in this multilevel model. We received a ‘fatal error’ that we had a memory shortage due to 5 dimensions of integration needed. We are using an 8 processor. Is there something incorrect with our input statement?

Model:

%WITHIN%

Conct by CO1R CO4R CO6R CO7R CO8R CO12R CO13R CO20R SE1R SE2R;
Schl by SE4R SE7R AE1R AE2R AE3R MR1R SV23R;
culture by FC1R FC3R FC4R FC8R;


S1 | Conct on culture;
S2 | Schl on culture;

Conct on Male White;
Schl on Male White;

CO12R WITH CO7R;
SE2R WITH SE1R;
SE7R WITH SE4R;
CO4R WITH CO1R;
AE3R WITH AE1R;
MR1R WITH CO4R;
CO13R WITH CO6R;
AE1R WITH SE7R;
CO20R WITH CO4R;


%BETWEEN%

Conctb by CO1R CO4R CO6R CO7R CO8R CO12R CO13R CO20R SE1R SE2R;
Schlb by SE4R SE7R AE1R AE2R AE3R MR1R SV23R;

CO1R-SE2R@0;
SE4R-SV23R@0;

Conctb on M032Tnrl M032MNRT M032SUSP;
Schlb on M032Tnrl M032MNRT M032SUSP;

s1 s2 on M032MNRT;
 Bengt O. Muthen posted on Wednesday, May 23, 2012 - 5:13 pm
I assume you have a 64-bit computer. With 5 dimensions you have 15^5 = a very high number of integration points. Taken together with a large sample, this causes memory problems. Try

integration = montecarlo(5000);
 Ewan Carr posted on Wednesday, June 27, 2012 - 10:11 am
I have several questions relating to cross-level interactions in Mplus.

I'm using Bayesian estimation. The model is:

%WITHIN%
s | y ON x;
%BETWEEN%
x ON w;
s ON w;
y on x w;

(this model also includes a mediating pathway, from x --> w --> y)

[1] How can I interpret the cross-level interaction effect (i.e. the regression of s on w, where s is the slope and w is the contextual effect)? Bengt's comment on May 16th makes sense, but when I ask for sample statistics I get:

> SWMATRIX is available only for TYPE=TWOLEVEL with estimators ULSMV, WLS, WLSM or WLSMV. Request for SWMATRIX will be ignored.

[2] Related to [1] is there any way of getting predicted values from Mplus?

[3] How can I test the significance of the interaction? (beyond just looking at the p-value or credible intervals). I'm guessing DIC isn't available with type=twolevel yet?

In other words: is there any way of comparing nested models, when "type=twolevel random" and "estimator=bayes"?

[4] I've run similar models in R/MLwiN -- testing the cross-level interaction effect the MLM way (i.e. with an interaction term). I get substantially different results, which is slightly worrying. Obviously, these are completely different approaches, but is there any reason to expect such variation?

Many thanks,

Ewan
--
 Bengt O. Muthen posted on Wednesday, June 27, 2012 - 8:54 pm
1. Do a Type = twolevel basic run to the sample statistics. Bayes does not use sampstat in its analysis and that's why you don't get that in your run.

2. Not directly.

3. The CI for s on w would seem to be the best way.

4. If the same estimator (ML/Bayes) is used, you should get the same results. If not, send the 2 outputs to Support.
 Ewan Carr posted on Thursday, June 28, 2012 - 3:00 am
Thank you Bengt, once again, for such a speedy response. It's much appreciated.
 Ewan Carr posted on Thursday, June 28, 2012 - 6:10 am
A quick follow-up question:

I've re-run the model using "type=twolevel basic", and the following estimation options:

type = twolevel basic;
estimator = WLS;
algorithm = integration;
integration = 7;

(Bayesian estimation isn't possible).

[Question 1]:

I've removed the "MODEL:" statement — that is, I'm just estimating an empty model. This is because "type=random" isn't possible with WLS.

Is this correct?

[Question 2]:

I get a file "swmatrix.dat" out. How is this file organised?

It just appears as a single column of numbers, with no labels (see here. I've searched the user guide and website for help with this, but can't find anything.

I need the SD of the between-level variable (w).

Many thanks,

Ewan
--
 Bengt O. Muthen posted on Thursday, June 28, 2012 - 8:41 am
Q1. Yes.

Q2. SW saving is described on page 668. It is not meant for inspection but rather to be available in a second run so these quantities don't have to be computed again. If you are interested in the within and between sample statistics, you look at the output from a Type=Twolevel Basic run, where you put w on the Between list.
 Ewan Carr posted on Friday, June 29, 2012 - 4:39 am
Thanks Bengt.

I think I've got this sorted. In case this is of use to others, I'll put my working here.

The model is:

%WITHIN%
s | satlife ON empsec;
%BETWEEN%
s ON rrlongsing;
satlife ON rrlongsing;


The sample statistics for the contextual variable (rrlongsing) are:

Variance387.39
SD19.68


The coefficient for the regression of "S ON RRLONGSING" is 0.007, and the intercept for S is -0.195.

I then calculate values for the regression at 1 SD above and below the mean of RRLONGSING:

19.68 * 0.007 = 0.138


This gives me the following values:

rrlongsing S ON empsec
Mean - 1 SD -19.44 -0.333
Mean 0.24 -0.195
Mean + 1 SD 19.92 -0.057


These can be plotted (see here), which seems to make sense.

Thanks!
 Bengt O. Muthen posted on Friday, June 29, 2012 - 8:25 am
If you express your computations in Model Constraint using model parameter labels you will both get better precision (more decimals) and SEs for the points in your graph.
 Kathryn Modecki posted on Thursday, July 19, 2012 - 1:18 am
I have come across a reference that suggests that random slopes are not necessarily required to test for (and subsequently find) a significant cross-level interaction. However, Hox makes no mention of this-nor have I seen any reference to this in searching the mplus forum. In a 2-level model, I have systematically tested for variation in level 1 slopes, and nothing is significant. However, when I 'cheated' and tested for cross-level interactions, several are significant. Is it reasonable to do this based on theory? Thanks.
 Bengt O. Muthen posted on Thursday, July 19, 2012 - 6:12 am
What's the reference?
 Kathryn Modecki posted on Thursday, July 19, 2012 - 9:04 pm
Multilevel Analysis: An Introduction to Basic and Advanced Multilevel Modeling. T. A. B. Snijders, Roel J. Bosker. (1999) p 96. This comes up in a google search: "multilevel cross level interaction non significant random slopes."
Also-Lesa Hoffman's talk: Society of Multivariate Experimental Psychology Annual Meeting October 2011
Systematically Varying Effects in Multilevel Models: Permissible or Problematic?
available at: http://psych.unl.edu/hoffman/Sheets/Talks.htm

Thanks.
 Bengt O. Muthen posted on Friday, July 20, 2012 - 8:44 pm
I see. Yes, this is a phenomenon that also happens in growth modeling where a slope growth factor may not have significant variance when excluding time-invariant predictors, but including them the effect of them on the slope is significant so the slope does vary. As the book page you mention says, it is a matter of having more power when you include the level 2 covariate and its interaction with the level 1 covariate.

So, yes, it is reasonable to do this.
 Kathryn Modecki posted on Sunday, July 22, 2012 - 6:01 am
Thank you Bengt. I also noticed that in Mplus Short Course Lesson 5A (slide 29) the random slopes are correlated with the dv, in what looks like a cross-level interaction (pasted below). Is this correct? I have seen elsewhere just the cross-level interaction, without "M92 with s1 s2". Thanks.

%WITHIN%
s1 | m92 ON female;
s2 | m92 ON stud_ses;
%BETWEEN%
m92 s1 s2 ON per_adva private catholic mean_ses;
m92 WITH s1 s2;
 Bengt O. Muthen posted on Sunday, July 22, 2012 - 9:50 am
Yes, this is a cross-level interaction model because s1, s2 are regressed on between-level covariates. The between level has 3 dependent variables and whenever there are several DVs I would covary their residuals. So, I would even add s1 with s2. But that covariation is a separate issue from cross-level interaction.
 Kathryn Modecki posted on Monday, July 23, 2012 - 12:32 am
That makes sense, thanks. Finally, when I run my MLM models (MLF estimator) with cross level interactions, they have significant p-values. However, testing nesting models using -2LL none of interaction models are significantly better. My understanding is that the -2LL is the better test, but this seems unusual. Can you indeed test nested models with MLF? Also, I'm assuming this is a 2-tailed test? Thanks very much.
 Linda K. Muthen posted on Monday, July 23, 2012 - 9:44 am
Please send the two outputs and your license number to support@statmodel.com.
 Kathryn Modecki posted on Tuesday, July 24, 2012 - 2:53 am
Thanks, I realized I needed to zero out the cross-level effects in the null model. I was incorrectly comparing a general two-level model to a two-level random model.
 Ewan Carr posted on Sunday, July 29, 2012 - 2:53 am
Dear Bengt/Linda,

I'm trying to interpret a coefficient in a two-level path analysis model.

The model is:

%WITHIN%

s | satlife ON empsec;

%BETWEEN%

satlife ON uempav grow;

empsec ON cons;
empsec ON uempav grow;
satlife ON empsec;


The between-level output is below; the coefficient of interest is highlighted:


SATLIFE ON

UEMPAV 0.000
GROW 0.037
EMPSEC -0.810

EMPSEC ON

CONS -0.927
UEMPAV 0.000
GROW -0.038

Means
S -0.230


My question, then, is what exactly does this coefficient represent? The mean S shows the individual-level effect of EMPSEC on SATLIFE, but I'm not sure how the between-level effect should be interpreted?

Many thanks,

Ewan
--
 Linda K. Muthen posted on Sunday, July 29, 2012 - 9:48 am
Please send the output and your license number to support@statmodel.com. Empsec should not be used on between. It should be on the WITHIN list. I need to see the full situation.
 Ewan Carr posted on Sunday, July 29, 2012 - 11:55 am
Thanks, I will do.

I was following the example of:

Preacher, K. J., Zhang, Z., & Zyphur, M. J. (2011). Alternative methods for assessing mediation in multilevel data: The advantages of multilevel SEM. Structural Equation Modeling, 18, 161- 182.


The syntax was adapted from:

http://www.quantpsy.org/pubs/syntax_appendix_081311.pdf
 Tom Carwell posted on Wednesday, February 06, 2013 - 11:19 am
Hi, first of all the forum is a great learning platform, thank you for managing it.
After reading the relevant posts, I wanted to ask your input on Mplus codes I set up for testing two cross-level interactions.

Model A- in which a dichotomous level-2 variable (high-1, low-0) moderates the relationship between two level-1 continuous variables:

USEVARIABLES ARE x y w;
WITHIN = x y;
BETWEEN = w;
Cluster = id;
ANALYSIS: TYPE IS COMPLEX TWOLEVEL random;
MODEL:
%WITHIN%;
beta1 | y ON x;
%BETWEEN%;
beta1 ON w;


Model B- in which a continuous level-2 variable moderates the relationship between a level-2 continuous variable and level-1 continuous variable

USEVARIABLES ARE x y w inter;
WITHIN = y;
BETWEEN = x w;
Cluster = id;
DEFINE: inter=x*w
ANALYSIS: TYPE IS TWOLEVEL random;
MODEL:
%WITHIN%;
%BETWEEN%;
y ON x w inter;
 Linda K. Muthen posted on Thursday, February 07, 2013 - 9:52 am
These look correction. In Model B, be certain the variance of y is estimated as the default. Otherwise add it on within.

y;
 Tom Carwell posted on Saturday, February 09, 2013 - 1:06 am
Hi Linda, thanks for time and suggestion.
 Kätlin Peets posted on Thursday, February 14, 2013 - 10:25 am
Hi,

I am conducting a simple slope analysis (following up a cross-level interaction). I am interested in associations between my individual-level predictor and dependent at high and low values of the classroom-level covariate (when pbur_1 is one standard deviation below and above the mean; or at -.032 and at .032). Is this syntax (Model constraint part) correct?

%within%
s1|pder_1 on affemp;

%between%

s1 ON pbur_1(gam1);
[s1] (gam0);
s1 with pder_1;

MODEL CONSTRAINT:
New (ylow yhigh);
ylow = (gam0+gam1*(-.032));
yhigh = (gam0+gam1*.032);
 Linda K. Muthen posted on Thursday, February 14, 2013 - 1:43 pm
I think this is correct as long as pbur_1 is centered with mean zero.
 Hannah Miller posted on Thursday, March 07, 2013 - 6:33 pm
Hello,

I am trying to estimate a multilevel CACE model. We have students nested within schools. The schools were randomly assigned to receive an intervention and some students complied (i.e., attended) the intervention. My CACE model was working fine, but now I am trying to add a cross-level interaction between the intervention (at level two) and a student characteristic (i.e., Spanish at level one). When I do that using the syntax below, I get the message "Fatal error: Internal code GH1002." Do you have any suggestions?

Cluster = sid;
Classes = c(2);
Training = c1-c2;
Within = Spanish FRL Latino Other logabs pretest p6 recip shexp1 shexp2 shexp3;
Between = FAST D1 D2 D3 B1 S1 S2 Cohort1;
Analysis: Type = twolevel random mixture;
miterations = 200;
Model: %within%
%overall%
pscale on Spanish FRL Latino Other logabs pretest;
c#1 on Spanish FRL Latino Other logabs pretest p6 recip shexp1 shexp2 shexp3;
s | pscale on Spanish;
%between%
%overall%
pscale on FAST D1 D2 D3 B1 S1 S2 Cohort1;
s on FAST;
%c#1%
pscale on FAST;
%c#2%
pscale on FAST@0;
 Linda K. Muthen posted on Friday, March 08, 2013 - 7:15 am
Please send your output and license number to support@statmodel.com.
 Lonneke Dubbelt posted on Monday, March 11, 2013 - 12:31 am
Dear Muthen,

We are trying to estimate a model with a level 2 outcome variable (pub) and two cross-level interactions (gender x motiv & goalcom x restime) We have used the syntax below.

DEFINE: CENTER gender goalcom pub (GRANDMEAN);
ANALYSIS:
TYPE = TWOLEVEL RANDOM;
ESTIMATOR = ML;
ALGORITHM = INTEGRATION;

MODEL:
%WITHIN%
s1 | restime ON motiv;
%BETWEEN%
s1 ON gender;
s2 | pub ON restime;
s2 ON goalcom;

This resulted in the following warning:
*** WARNING in MODEL command
In the MODEL command, the following variable is an x-variable on the BETWEEN
level and a y-variable on the WITHIN level. This variable will be treated
as a y-variable on both levels: RESTIME
*** ERROR in MODEL command
Observed variable on the right-hand side of a between-level ON statement
for a random slope must be a BETWEEN variable.
Problem with: RESTIME

Is there a way to model this model?

Thank you
 Linda K. Muthen posted on Monday, March 11, 2013 - 10:55 am
The two random regressions should be on the within level not the between level. Why do you have

s2 | pub ON restime;

on between?
 Lonneke Dubbelt posted on Tuesday, March 12, 2013 - 1:30 am
Dear Linda,

Thank you for your response.
pub is a between level outcome, that's why we defined it on the between level. Gender and goalcom are also on the between level.
 Linda K. Muthen posted on Tuesday, March 12, 2013 - 9:10 am
T think what you want is:

WITHIN = RESTIME;
BETWEEN = gender clusrest goalcom inter;
MODEL:
%WITHIN%
s1 | restime ON motiv;
%BETWEEN%
s1 ON gender;
pub ON clusrest goalcom inter;

where clusrest is a cluster level observed variable that you create in DEFINE along with the interaction between that variable and goalcom (inter).
 Lonneke Dubbelt posted on Thursday, March 14, 2013 - 3:16 am
Thank you for your response.
I've made the adjustments, but I still get an error. My input looks like this:

WITHIN = motiv restime;
BETWEEN = gender clusrest goalcom pub inter;
CLUSTER = employee;
MISSING ARE ALL (999);

DEFINE: CENTER gender goalcom pub (GRANDMEAN);
ANALYSIS:
TYPE = TWOLEVEL RANDOM;
ESTIMATOR = ML;
ALGORITHM = INTEGRATION;

MODEL:
%WITHIN%
s1 | restime ON motiv;
%BETWEEN%
s1 ON gender;
pub ON clusrest inter;

And this is the error I get:

*** WARNING in MODEL command
Variable on the left-hand side of an ON statement in a | statement is a
WITHIN variable. The intercept for this variable is not random.
Variable: RESTIME
*** ERROR
One or more between-level variables have variation within a cluster for
one or more clusters. Check your data and format statement.

Between Cluster ID with variation in this variable
Variable (only one cluster ID will be listed)

INTER 1
 Linda K. Muthen posted on Thursday, March 14, 2013 - 6:29 am
I think it should be

WITHIN = motiv;

not restme

The inter variable should be the same for each cluster member. All variables on the between list need to be the same for each cluster member. Check you data.
 Lonneke Dubbelt posted on Monday, March 18, 2013 - 2:33 am
Thank you for your response.
I've checked my data and tried different things. Now I get this error:
One or more variables in the data set have no non-missing values.
Check your data and format statement.

Continuous Number of
Variable Observations Variance

PUB 200 19.296
DAY 200 2.010
RESTIME 200 6.476
MOTIV 200 1.241
GENDER 200 0.241
GOALCOM 200 0.498
CLUSREST 200 3.764
**INTER 0

This is what my define statement looks like:
DEFINE:
clusrest = CLUSTER_MEAN (restime);
CENTER gender clusrest goalcom pub inter (GRANDMEAN);
inter = goalcom * clusrest;

Thank you in advance.
 Linda K. Muthen posted on Monday, March 18, 2013 - 6:27 am
Please send your input, data, output, and license number to support@statmodel.com.
 Hannah Miller posted on Thursday, April 18, 2013 - 7:53 am
Hello,

I would like to estimate a two-level CACE model with a cross-level interaction between the treatment and a covariate. Since the treatment effect is fixed at zero for non-compliers, I think the cross-level interaction should also be fixed at zero for non-compliers. I thought the code would be something like this:

Model: %within%
%overall%
pscale on EngLat Other FRL;
c#1 on EngLat SpanLat Other FRL pretest p6 recip shexp1 shexp2 shexp3;
s | pscale on SpanLat;
%between%
%overall%
pscale on FAST D1 D2 D3 B1 S1 S2 Cohort1;
s on FAST;
%c#1%
pscale on FAST;
s on FAST;
%c#2%
pscale on FAST@0;
s on FAST@0;

However, I am getting this error command: "*** ERROR in MODEL command
Parameters involving between-level variables are not allowed to
vary across classes."

The model runs fine when I do not include the "s on FAST" commands separately for each compliance class, but then the results show a significant interaction between the treatment and the covariate for non-compliers.

Thanks in advance.
 Linda K. Muthen posted on Thursday, April 18, 2013 - 11:12 am
Please send the full output and your license number to support@statmodel.com.
 Dave posted on Thursday, May 16, 2013 - 9:45 am
I have encountered a situation similar to the one described by Kathryn Modecki posted on Monday, July 23, 2012 - 12:32 am. I am comparing the following models:

%WITHIN%
s1 | DV on IV;
%BETWEEN%
DV ON Con1 Con2;
S1 ON Mod1 Mod2 Int@0 Con1 Con2;
DV with s1;

MODEL FIT INFORMATION
Free Parameters: 12
Loglikelihood
H0 Value - -0.154
H0 Scaling Correction Factor - 1.5249

And

%WITHIN%
s1 | DV on IV;
%BETWEEN%
DV ON Con1 Con2;
S1 ON Mod1 Mod2 Int Con1 Con2;
DV with s1;

MODEL FIT INFORMATION
Free Parameters: 13
Loglikelihood
H0 Value - 1.446
H0 Scaling Correction Factor - 1.4745

Int is an interaction term created by multiplying Mod1 and Mod2 to create a three way cross level interaction. I believe these models are nested. Int has a significant p value (p = 0.033). When testing these two nested models using -2LL the model with the interaction is not significantly better (chi_sq = 3.66 vs 3.84; p = 0.055). I am wondering if you can provide me with guidance regarding how to interpret this finding. Thanks in advance for your attention.
 Bengt O. Muthen posted on Thursday, May 16, 2013 - 11:27 am
It sounds like you are comparing an approximate z-test (which when squared is approx. chi2 with 1 df) p-value of 0.033 with an approximate chi-2 test with 1 df with a p-value of 0.055. Such a small p-value difference can be expected, particularly in samples that are not large, in this case the number of clusters. You have two methods giving asymptotic approximations to chi-2 and for any given sample size they can differ.
 Praneet Randhawa posted on Sunday, June 30, 2013 - 6:48 am
Hi Linda:

I ran a multilevel model to test some cross-level interactions. Now, I am interested in plotting those effects using Preacher's website. I was not very sure if I was inputting the right numbers in the table. I would greatly appreciate if you could confirm where I should look for the numbers

Regression Coefficients (gamma for Intercept, gamma for IV, Gamma for Moderator and gamma for Interaction effect)?
Coefficient Variances?
Coefficient Covariances?
Conditional Values for w and x (if I want to model +1SD, mean,-1SD values of the moderator)?
df (int)?
df (slope)?

Here is the link to Preacher’s website and I am referring to case 3: http://www.quantpsy.org/interact/hlm2.htm

Your help in this matter would be greatly appreciated!

Thanks!
 Linda K. Muthen posted on Monday, July 01, 2013 - 7:41 am
The values you need are found in TECH3. Contact Kris Preacher is you have question about his link.

You can also see Example 3.18 in the user's guide which uses the LOOP option. This can be applied to cross-level interactions.
 Praneet Randhawa posted on Wednesday, July 10, 2013 - 8:10 am
Hi Linda:

Thanks a ton for your response. I am sorry for the tardy reply. I was under the impression that I will get an email notification once you respond to my query, which obviously I did not get. Anyway, I greatly appreciate the help.

Thanks again,
Praneet
 Linda K. Muthen posted on Wednesday, July 10, 2013 - 12:26 pm
Responses are given on Mplus Discussion not via email.
 Sara Guediri posted on Monday, September 09, 2013 - 10:35 am
Hi,

I'm testing a cross-level interaction and depending on whether I grand mean centre the Level 2 moderator or not, I get different results for the intercept of the random slope.
This affects the direction of the cross-level interaction. Should I go with the results when the level 2 moderator is grand-mean centred or leave the level 2 variable at its raw score?

Many thanks
 Linda K. Muthen posted on Tuesday, September 10, 2013 - 11:01 am
You should grand mean center. See the Raudenbush and Bryk book for further information.
 Johnna Capitano posted on Friday, October 11, 2013 - 11:22 am
As a follow up to the previously posted question and answer:

" kirsten way posted on Friday, October 21, 2011 - 10:46 pm
Hi,

I'm trying to plot my significant cross level interaction using preacher's calculator. I've requested TECH3 in the output to get the coefficient covariances, but wanted to ask - how do I ascertain what variables the parameter numbers in the printout refer to?

Thank-you!

Linda K. Muthen posted on Saturday, October 22, 2011 - 6:29 am
They refer to the parameter numbers in TECH1."

Since I have 10 parameters and TECH3 reports 11 in the covariance matrix, should I be looking at the number labels assigned under Beta in TECH1? I thought it odd that the numbering goes 0,2,3,4... and just want to be sure I am looking at the correct number labels. THANK YOU!

Johnna
 Bengt O. Muthen posted on Friday, October 11, 2013 - 11:39 am
Please send your output to Support so we can see what you are referring to.

Note also that you no longer need to use the Preacher calculator to plot cross-level interactions because Mplus offers the LOOP and PLOT options of MODEL CONSTRAINT. See slides 21-24 of the Utrecht training August 2012:

http://mplus.fss.uu.nl/files/2012/09
V7Part1.pdf
 Johnna Capitano posted on Monday, October 14, 2013 - 8:10 am
Bengt - Thank you. I just sent my output. I could not find the slides or presentation you suggested. It says file not found. Would you mind checking the link and resending? I'd appreciate it.

Regards,
Johnna
 Bengt O. Muthen posted on Monday, October 14, 2013 - 8:56 am
Perhaps you didn't get both lines of the link?

http://mplus.fss.uu.nl/files/2012/09
V7Part1.pdf
 Paraskevas Petrou posted on Friday, November 29, 2013 - 5:04 am
Dear Bengt & Linda,

Below is a cross-level interaction I am testing in a multi-level latent SEM model:

Within = x1 x2 x3;
Between = m1 m2 m3 w1 w2 w3;

ANALYSIS:
Type is random twolevel;
ESTIMATOR = ML;
ALGORITHM=INTEGRATION;
MODEL:
%WITHIN%
F1 by y1 y2 y3;
F2 by x1 x2 x3;
s | F1 ON F2;
%BETWEEN%
F3 by m1 m2 m3;
F4 by w1 w2 w3;
s ON F3;
F1 ON F4;

The above model works but only without the very last statement "F1 ON F4" because F1 has been defined as within-level. I need this statement to control for the effect of a between-level variable to a within-level variable. In path analysis I am able to work around this problem but not in a latent model. What could I do?

Thanks!
Paris
 Linda K. Muthen posted on Friday, November 29, 2013 - 9:42 am
You must create a factor on between that uses the between part of y1, y2, and y3.

MODEL:
%WITHIN%
wF1 by y1 y2 y3;
F2 by x1 x2 x3;
s | F1 ON F2;
%BETWEEN%
bF1 by y1 y2 y3;
F3 by m1 m2 m3;
F4 by w1 w2 w3;
s ON F3;
bF1 ON F4;
 Paraskevas Petrou posted on Tuesday, December 03, 2013 - 11:56 pm
Dear Linda,

Thank you!

I am wondering if the statement "s | F1 ON F2" is a full test of moderation. Normally in moderation you also need the main effect of the moderator on the outcome, e.g., "bF1 ON F3". Should I include this statement or is it accounted for by the statement "s | F1 ON F2"?

Also, how do I plot this interaction?
 Linda K. Muthen posted on Wednesday, December 04, 2013 - 9:10 am
s | F1 ON F2 defines a random slope. I'm not sure how you see this as moderation.
 Ewan Carr posted on Monday, March 03, 2014 - 1:44 pm
Dear Bengt/Linda,

I'm following up on a question from two years ago.

I have a multilevel path model, with a cross-level interaction (implemented as a random slope). Mplus doesn't currently offer overall model fit statistics for multilevel SEM models (e.g. DIC). To test the significance of the cross-level interaction, I asked:


quote:

How can I test the significance of the interaction? (beyond just looking at the p-value or credible intervals)




The response I got was:


quote:

3. The CI for s on w would seem to be the best way.

(Bengt, 2012-06-27 2054)




Is there any reference/citation you could suggest that would either support this decision, or where a similar approach is taken? (A reviewer is asking for a measure of overall model fit; I'm trying to argue that this approach -- of looking at the credible intervals -- is adequate).

Many thanks,

Ewan
--
 Linda K. Muthen posted on Tuesday, March 04, 2014 - 10:12 am
In this situation, no absolute fit statistics are available. There is not a single covariance matrix because the variance of y varies as a function of x. This is not something specific to Mplus.

The confidence interval gives the same result as a one degree of freedom chi-square difference test between a model without the interaction term and a model with the interaction term.
 Ewan Carr posted on Saturday, March 08, 2014 - 10:46 am
Many thanks, that is most useful.

Ewan
 Briana Chang posted on Wednesday, April 16, 2014 - 3:12 pm
Dear Bengt & Linda,

I am attempting to write syntax for a multilevel structural equation model with several cross-level interactions.

The relationship of interest is between 7 indicators for race/gender (e.g., White Female, Black Male, Black Female, etc) and a continuous latent variable. This relationship is defined by partially mediated moderation by group-level variables where B1 moderates these relationships and B2 partially mediates this moderation.

Given that I would need 7 random slopes to specify the cross-level interactions as typically defined in Mplus (and that from my understanding, modeling several random slopes can get quite hairy), I would like to estimate this model with a random intercept only (and no random slopes).

Can I create cross products between my 7 indicators and B1 for use in such a model instead of utilizing random slopes?

Thank you for any help!
Briana
 Bengt O. Muthen posted on Wednesday, April 16, 2014 - 5:47 pm
Yes.
 C G posted on Tuesday, September 16, 2014 - 1:20 pm
Dear Dr. Muthen

I am using Mplus to do multi-level path analyses. I want to test the interaction results from a cross level prediction of a level 1 random effect by a level 2 covariate.

When I interpret and plot the results, I am not sure which mean score to use as there are two sorts of mean scores, one at the within level and another at the between level.

Any help will be highly appreciated. Thank you very much.
 Bengt O. Muthen posted on Tuesday, September 16, 2014 - 1:46 pm
Have a look at the cross-level interaction plot information at

http://www.statmodel.com/Mediation.shtml
 Ansylla Payne posted on Saturday, October 04, 2014 - 12:18 am
Hi, what does "ERROR in VARIABLE command
Unknown modifier in the BETWEEN option: LEVEL2" mean?
 Linda K. Muthen posted on Saturday, October 04, 2014 - 5:21 am
It sounds like you are using level2 instead of the name of your level 2 cluster variable. If not, please send the output and your license number to support@statmodel.com.
 Ansylla Payne posted on Saturday, October 04, 2014 - 10:14 am
Dear Linda:

Thank you kindly for your response. I have forwarded my files to the address given.

Regards,
Ansylla
 Julie McCarthy posted on Wednesday, October 22, 2014 - 11:17 am
Good afternoon,

I am running a two-level path analysis in MPlus and would like to model a cross-level interaction where the IV is at the group level, the dv is at the individual level and the moderator is at the group level. I have identified the IV and moderator as between subject effects.

It is also my understanding that I can use the define command to create the interaction variable:

Define:
int = IV*moderator;

Where I am having difficulty is creating the syntax for the within and between effects. In other words, do I include syntax on the within and between effects? Where would the following command appear?

int on IV;

Any help you could provide is greatly appreciated.
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: