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.

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.

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?

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.

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.

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.

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.

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?

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.

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.

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.

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.

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?

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?

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?

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.

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.

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.

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.

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?

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.

*** 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.

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?

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.

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?

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.

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?

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?

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.

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.

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.

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.

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.

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.

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?

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:

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?

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?

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

*** 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)

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.

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:

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.

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.

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.

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

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.

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?

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!

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:

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?

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"?

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).

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?

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?

In your correction, I understand where the moderation comes in with the inclusion of:

%WITHIN% Y on X Y on AX

%BETWEEN% Y on A

But I am missing where this moderation effect is mediated by B. This was why I had included the statement "B on AX".

And since I suppose is possible that the X->Y effect is also mediated by B, I included "B on X".

Does that make sense? I can see from elsewhere on the discussion board that "level-2 random intercept part of an individual's variable predicts the level-2 variable" but I'm not sure what this would mean for the syntax.

But I don't quite understand this? Way back at the data entry stage if there were members of the group who no longer participated in the study at T3 then no values were entered (not even corresponding between level data)... .so for example if the group went from 5 to 2 then EI values were only entered for the 2 remaining individual level participants ...... should i have entered the corresponding between level data for the three who no longer participated?

Often I have to test cross-level interactions in complex models in which it has been suggested to create latent variables to form the interaction term (XL by XL@1;XL@0).

I was therefore expecting the following approaches to test a cross-level interaction to held similar results, but this is not the case. Am I wrong to assume this should be similar? When is it appropriate then to create a latent variable on subsequently create an interaction term. Many thanks for any clarification!

Hi, I am running a cross-level interaction model (IV: FSSB and DV: WFBI at the 1st level, W:agCFam at the 2nd level) with control variables (ageI1 sexI1 full). Why do I get different findings for s on agCFam when I run the two models below and which one is the correct approach?Model 1 and 2 should only differ in regards to the plotting? Also, if I define the interaction via define and regress s on it in the between, I get p = .445. If I center according to a hybrid approach (Aguinis & Culpepper, 2015; Preache et al.,2010), I get totally different significant findings for all of the first two models, and p =.951 for the define command model. Also, is it okay to only have the controls at the within? Because if I add them to the between they would function as moderators. Thanks, Kristin

Hi Linda & Ben: I have analyzed a two-level model with a predictor x, a meditator m and 2 outcomes y & z in a team sample. I argued that the relationships occur at both the individual and the team level. As all variables were assessed by asking individuals (L1), I acknowledge Preacher, Zhang & Zhypur, 2010, stating that variables assessed at L1 typically have both L2 and L1 components. They further state that for such cases the L2 component is necessarily uncorrelated with the L1 component of that variable and the L1 components of all other variables in the model. Therefore, I calculated the 1-1-1 model, splitting each variable's variance into L1 and L2 components and calculated the relationship between the L1 component of x and the L1 component of m, y and z and the relationship between the L2 component of x and the L2 components of m, y and z. Am I right up to this point? Anyway, in the opinion of the editors from my target journal, x should only be modeled at L2, while m, y, and z should be modeled at both levels. I am asked to report the cross-level interactions between my variables. As this is not the first time that I have been asked to do that, I am wondering if I misunderstood something? Is there a way to neglect the L1-component of x and model only the relationship between the L2-component of x and the L1 and L2 components of m, y and z? If so, could you help me on how I'd have to change my input? Thank you so much in advance!

Cross-level interactions occur when you have random slopes and that gives rise to a special mediation formula. But random slopes are rare - you can look for one at a time if you like (using s | y on m, for example).

Thanks for your response. I don't think my last post was not very clear.

I have a variable representing individual self-regulation, and want to look at its relationship to a literacy indicator. I also want to look at class self-regulation as a predictor of early literacy. My class self-regulation variable would be an aggregate of the individual self-reg. variable. I used example 9.2 to do this by making my self-reg variable a latent contextual variable. Now, I was wondering if there is any way I can look at the interaction of latent level 2 (class) self-reg with individual self-reg to evaluate whether class self-reg affects individuals with different self-reg scores the same way. Thanks again for all of the help.

Hi Ben, thank you so much for your answer! x represents leadership behavior and its effects on employee reactions are analyzed. As x was assessed at L1 (team member ratings), am I right that it would be wrong to only take the aggregated value of x into account? Moreover, as we also aim to analyze individual reactions to that leadership behavior, I was sure that the 1-1-1 model was the correct one. Do you agree or am I missing something?

If however, I follow the editor's wish and neglect the individual variance in x, would the 2-1-1 model be the model of choice? And in that case - am I right that then no Level 1 mediation effect would or could be modeled?

Are there any other solutions to follow the editor's wish to have x only at L2 while still analyzing its effects on both L1 and L2 variables? Thanks so much in advance!

It's hard for me to say without sinking into the research setting. If you want x->m->y on level 1 you must be thinking that an individual's rating of his/her team leader influences m, y on level 1.

It would be fine to not have a mediation model on level 1.

Even if you don't have a mediation model on level 1 you can estimate the level 1 variance of x. That is, you can do the Mplus latent variable decomposition of x so that x on between is the latent, more reliable, between part of x. The advantage of that is described in the paper on our website:

Hello, I have collected ESM data of mood and events (repeated measures nested within person).I have modeled the regression of mood at T+1 on event at T =0. I created a moodT+1 variable on SPPS using SHIFT VALUES command on SPSS which essentially drops each line of data down by one row. Am I correct in assuming that the original mood variable (mood at t = 0) can be used as level 1 co-variate to control for the effects of mood at t = 0. OR does MPLUS aggregate this variable over cluster? Many thanks.

First, I'm trying to run a cross-level model with latent variables but I keep getting the following error:

THE LOGLIKELIHOOD DECREASED IN THE LAST EM ITERATION. CHANGE YOUR MODEL, STARTING VALUES AND/OR THE NUMBER OF INTEGRATION POINTS.

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

When I run the model with only a fixed slope (just defining factors A and B in the within model command, then specifying A ON B), the model will converge fine. However, if I allow the slope to be random (b1 | A ON B in the within command), I get this error. Do you know what might be going wrong?

Second, is there a way to groupmean center a latent?

Last, I have a basic question. What is the difference between a model where I put all Level 1 variables in the Variable: Within = section vs. one where I don't? For example:

I wasn't completely sure what partial results referred to but the model results following the error I pasted in my original message says that the variance of b1 is 28.387. However, I have no idea what metric I should be comparing that against and whether this is meaningful. If it helps at all, when I run the model with the latents as an observed average of their indicators, the variance of the path is highly significant.

I'm also extremely new to cross-level models, especially with latents, so would it be possible for you to explain what integration parts are/do or direct me to a source where I could get a better basic understanding? Thank you!

Hello, I think my problem is related on this board. So I'm posting questions. My model is a multilevel SEM(2-level). I also want to research cross-level effects. I read chapter 9 in user¡¯s guide and make the following code but it has errors. I appreciate your checking.

*** 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: SLS 1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS

Thank you so much for your kind and helpful reply. Concerning your second point, however, I was wondering how I can construct the random slope at the level below the highest, when my DV can only be defined at the between-level.. Could you please give me an idea of how to adddress this issue in my syntax?

It isn't possible in Mplus, or other multilevel programs, to have a random slope vary on its own level so to speak. Your random slope refers to a Level-2 relationship so you would need a third level across which units this slope varies.

An exception in Mplus is UG ex 3.9, which has a single-level model with a random slope. But that is a special kind of heteroscedasticity modeling that I have not seen carried out in a multilevel setting.

I have two variables that vary at both the within and between level. I would like to form a within-level observed interaction term from these variables, and then examine both the within and between variance of this interaction term as predictors of an outcome. Is the following syntax correct, or would the specification be more complex?

I am fitting a two-part model by using a multilevel approach to model longitudinal trajectory. “AL” is my outcome variable across five time points. X is a time varying covariate across five time points. TX is treatment status. I want to create a cross-level interaction between baseline value of X and TX (i.e., TX * baseline value of X), and see how TX*baseline value of X influences time slope. I have a couple of questions: 1. How to specify the baseline value of X? 2. How should I create the interaction term? 3. Should I put the interaction term in the place of “between” or “within”

On a cross-level interaction plot produced by MPlus, I would like to swap the L1 predictor and L2 moderator, so that I would see and interpret the alternative symmetrical result of the L1 variable being the moderator and L2 variable being the predictor. I was wondering how I could ask the cross-level interaction plot in this way.

My model is as follows. In this code, the plot command produces an interaction plot wherein L1x is the predictor, L2w the moderator, and y the outcome. My aim is to get a plot wherein L2w is the predictor and L1x is the moderator.

I've been using a different plot command than the one you shared with the link. As you suggested, I also tried the PLOT (crosslvl) command and don't seem to be able to swap L2w for L1x. It seems to me that crosslvl and mod are labels - crosslvl indicating the outcome y and mod referring to moderator L2w. Hence, simply replacing the mod label doesn't seem to produce a symmetrical interaction plot.

In your code L2w is a between-level variable and L1x is a within-level variable. So L2w can't take the role of L1x on Within and L1x can't take the role of L2x on Between. But maybe I am misunderstanding you.

Many thanks; you understand my point correctly. In fact, what I am trying to do features in the Aguinis, Gottfredson, and Culpepper paper (p.1514): "..can we say that the L2 variable moderates the effect of the L1 predictor on the L1 criterion and, also, that the L1 predictor moderates the effect of the L2 predictor on the L1 criterion? From a statistical standpoint, it is just as appropriate to label the L2 predictor as the moderator of the effect of the L1 predictor X on the L1 outcome Y as it is to label the L1 predictor X as the moderator of the effect of the L2 predictor W on the L1 outcome Y because cross-level interactions are symmetrical."

I'd like to plot the cross-level interaction in the way I described because of conceptual reasons. My cross-level hypothesis makes much more sense with L1x as the moderator. The way we set up cross-level interactions in MPlus, i.e. creating the latent variable S to represent a within relationship and explaining it by a between variable, lends itself into a plot where we always have the L2 variable as the moderator. Hence, the symmetrical version is likely to require an alternative set-up of the cross-level interaction in the model command, which I was not able to figure out. If that's somehow possible in MPlus, I would appreciate your help.

Hello! I wanted to ask: Is it possible to create a cross-level interaction term from 2 latent variables (one on the between-level and one on the within-in)? It seems when discussing the cross-level interactions most people are either discussing observed variables on either level or perhaps only one latent variable and one observed. My apologies if the answer was in this forum and I couldn't find it (or if it involves something obvious that I should already know). Thank you in advance!

I'm having a little trouble understanding cross-level interactions. I'm interested in a random intercepts model where a family-level covariate interacts with a individual-level covariate-- and I'm specifically interested in whether the interaction between the covariates explains variance across individuals (not families) in my DV. All variables are observed. It seems like the approach recommended here is using syntax such as:

I am fitting multi-level SEM, since I have ego-alter data. Ego is the individual, who has rated up to 5 alters. I would like to add moderated mediation, where the mediation is within (1-1-1) and the moderator is between. But I would like to moderate the first part of mediation so if my mediation is x (a friend is international or not) mediator (frequency of socialization) y1 (work support) y2 (emotional support) moderator (ego's ability to speak foreign language)

I have a followup question to Selin Kudret's Feb 26 post and Bengt's answer. What if my L1 moderator is binary rather than continuous? In that case it doesn't seem to make sense to compute a cluster mean variable. Any help would be appreciated.

I have a 2-1-2-2 model, with the 1-2 path moderated by another Level 2 variable. In order, my L2 variables are Cond, PC, and IS. My L1 variable is AS, and the L2 moderator is PFB.

While I'm able to write the syntax for the basic 2-1-2-2 model, I'm unable to figure out the cross-level interaction that has a Level 2 dependent variable. Am I correct in creating the interaction term between the Level 1 and Level 2 variables (Int = AS * PFB) in the dataset, and then using this term as the variable to predict the L2 variable?

Hi, I would like to test whether the relation between a level-1 x- variable (gender) and a level-1 y-variable (individual's motivation) is moderated by a level-2 m- variable (context variable). In example no. 9.2 of the user guide, the y variable is decomposed and also modelled at level 2. However, I am not sure whether this syntax applies to my research question as I am interested in the relationship between two level-1 variables and whether it is moderated by a level-2 moderator. Would this syntax be correct for my research question?

This is a follow up question regarding the answer to the question posted by Selin Kudret on Friday, February 26, 2016, regarding a cross-level hypothesis with a L2 predictor (L2W), a L1 criterion (y) and a L1 moderator (L1x). This researcher used a random slope to estimate the interaction.

"You can do it this way I think. Drop the random slope. Create a cluster mean variable for L1X, say L1XM declared as a between variable. Then on Between drop all the random slope references and instead have only y ON L1XM L2W Inter; where Inter is created in Define as L2W*L1X".

I wonder if you can give us a reference paper or book to justify this procedure to estimate this kind of interaction. Thanks

I’d like to request some help with the following example. I have a sample of international subsidiaries (level 1) which belong to different companies (level 2a) and are located across several host countries (level 2b). Each subsidiary’s performance (sub_perf) is affected by characteristics of the host country (say the regulatory environment e.g. the contry's “Ease of using business index”; reg_env) and by the company’s characteristics (say international experience; int_exp). So far that is no problem. However, what do I do to test the following interaction: For companies with a higher international experience the (negative) effect of a difficult regulatory environment on subsidiary performance is weaker than for those with less international experience? My first attempt was this:

Dear Bengt/Linda, I am fitting a two-level SEM. The outcome variable is a count variable (d), the model takes the form of a piecewise exponential model (or better its Poisson equivalent). The latent variable DEPR is defined at level 2. I would like to fit the model including a cross-level interaction DEPR_pnm between DEPR and the dummy per_pnm defined at level 1.

I came out with this (using runmplus in stata), is this the right approach? Thanks!

Thanks for the reply. Indeed changing the sequence of the clusters apparently gets me a step further.

Still: "Observed variable on the right-hand side of a between-level ON statement for a random slope cannot be a BETWEEN variable for TYPE=CROSSCLASSIFIED"

I think the problem is still the same, because I am interessted in the interaction beween two BETWEEN level variables. I assume this doesn't work either way in crossclassified.

Are there any thoughts on the second idea I posted, i.e. including an ON statement with an interaction term (of both BETWEEN-level variables) on the WITHIN level? The estimation runs smoothely, but I am still not sure whether the results from such an approch are any meaningful. Am I somehow cutting corners with that?

That variable is a covariate so you can specify it as a within. The order of the clusters is not important either. My reference to 9.26 is not appropriate since 9.26 has interactions of two-latent variables (which needs a special order of the cluster variables).

I'm trying to plot my significant cross level interaction using preacher's calculator. I've requested TECH1 in the output to identify the parameter numbers, and TECH3 in the output to get the coefficient covariances. However, I'm only finding parameter numbers for the within-level coefficients. The parameter number for the intercept is showing up (in the alpha matrix) as 0, and all of the between-level coefficient parameter numbers are showing up (in the beta matrix) as 0 as well. Are there different matrices I'm supposed to be looking at in tech1 to find the parameter numbers for the intercept and for the between-level effects?

But if a Level 2 moderator like your Z_mean interacts with a level 1 covariate, this means that there is variation in the slope over between-level units. The two are not different things - if you don't have a significant random slope it would seem that you don't have a significant interaction.

you suggested that covariances of residuals on the between level need to be included if there are several outcomes on the between level. My model runs without these covariances, but when they are entered this message occurs under MLR:

MAXIMUM LOG-LIKELIHOOD VALUE FOR THE UNRESTRICTED (H1) MODEL IS -406.704

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO AN ILL-CONDITIONED FISHER INFORMATION MATRIX. CHANGE YOUR MODEL AND/OR STARTING VALUES.

The model works though with Bayes, but the MLR is preferred. My question is whether estimates are still correctly interpretable when those covariances are not included?

Dear Bengt/Linda, I am testing a two levels model with two interactions : - a first one which is a cross level interaction involving the WL2 moderator and the within part of X - a second one involving the WL2 moderator and the between part of X (X climate). I have difficulties to test the second interaction. Am I correct with this syntax ?

BETWEEN ARE WL2;

ANALYSIS: TYPE IS TWOLEVEL RANDOM;

DEFINE: INT = X*WL2;

MODEL: %WITHIN% S | Y ON X;

%BETWEEN% S ON WL2; !cross level interaction involving the WL2 moderator and the within part of X Y ON X WL2 INT ; ! interaction at level 2 involving the WL2 moderator and the between part of X (X climate).

I am writing a paper on how 'teaching and learning practices' can influence students civic knowledge pv1civ (next stap is to observe all plausible values, not yet done is this analysis). I found interesting results and a random slope (differences in vocational and general track = multilevel interaction STROOM) while running the analyses observing the influence of 'opportunities to participation (SPART)'. But what does Mplus do when I give more teaching and learning practices in the input (SPART, OPD, and CVLN)? Does Mplus make a sum of these variables? Because I get a similar output as when I only observe SPART (only different results)

I am running a multilevel regression with a three way interaction term. two variables: x1 and x2 are level 1 variables and z1 is a level two variable. Hence in my equation i will have one of the IVs the term x1*x2*z1. I would like to know how do I plot the result through the loop command. Can you point me towards any code which i can use.