Forgive me if this question is too general. I have used HLM to determine the siginificance of a cross-level interaction in a multilevel model. However, I would like to compare the fit of the overall path model, to a second nested model. I have decided to use SEM and Mplus to do this. Yet, it is not clear to me if I can generate a cross-level interaction with a multilevel SEM. I haven't seen this in the literature either. The models and literature by both Muthens has been very helpful, but I hadn't seen anything about this possibility. You are innovators with regard to multilevel SEMs, so I am sure you can offer some information.
I just wanted to confirm that the Verena Hahn's post on Tuesday, August 7th, 2012 is still what you would suggest. I have a multilevel model where repeated measures are taken at two time points within persons. I'm only interested in the fixed effect of the within person slope but to also allow a random intercept. I also expect that the fixed slope will be moderated by a level 2 variable. In other words, I'm only interested in examining whether the average within person effect changes as a function of a level 2 variable. As such, I'm interested in a cross-level interaction where the level 1 slope is not randomly varying. Would you still recommend implementing this in Mplus as:
MODEL: %WITHIN%; beta1 | y ON x; %BETWEEN%; y on w; beta1 ON w; beta1 @0;
That seems like a correct setup. I wouldn't say that the slope isn't varying because it does vary as a function of w. I also don't see the need for fixing the residual variance at zero for the slope on between - that says w totally determines the variation in the slope.
Thank you Dr. Muthen. I see what mean about the slope varying across w. If I omit the residual constraint (i.e., beta1 @0) won't that estimate the random effect for the level 1 slope? I was under the impression that with only two level 1 observations a model with both a random intercept and slope would be underidentified and that the residual constraint is necessary for model identification.
I have a quick question. When we are testing cross-level interactions, do we test the main effects between the two level 1 variables in the hypothesized interactive model?
For example: Within s1 | Y ON X; YW ON X;
Between s1 WITH YB; YB s1 ON Z1 Z2;
In the above model, the effect of YW ON X is negative and non-significant. Whereas in the main effects model, the effect was positive and significant. I saw some papers report similar effects but argued that lower level effects should not be interpreted in the presence of higher level effects. Is that the way to go? And what the reasoning behind such an effect? Thank you.
I'm testing a cross-level interaction in a three-level longitudinal model (time-persons-classes). L3 (time-invariant) predictor "Z_grandmean" moderates the random effect of L2 (time-invariant) predictor "X_grandmean" on L1 outcome "Y".
1. Is this code correct?:
cluster = class id; between = (id)X_grandmean (class) Z_grandmean; within = wave Qwave X_personcenter; MODEL: %within% Y; S1 | Y ON wave; Y ON Qwave; Y ON X_personcenter; %between id% Y; S1; Y WITH S1; S2 | S1 ON X_grandmean; %between class% Y; s1; s2; Y WITH s1; Y WITH s2; s2 ON Z_grandmean;
2. When I'm running this code I get an error message: "One or more between-level variables have variation within a cluster for one or more CLASS clusters. Check your data and format statement. Between Cluster IDs with variation in this variable: Z_grandmean 34 19 31 36 16 6 14" Z_grandmean is grand-mean centered at L3 and X_grandmean is grand-mean centered at L2.
I am currently testing a level 1 mediation model with a level 2 moderator variable (VAR).
The model gives me this error message:
*** 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: RC *** 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: COMM
For the given script: WITHIN = NPI RC COMM; BETWEEN = VAR;
define: center NPI RC (groupmean); ANALYSIS: TYPE = TWOLEVEL RANDOM;
MODEL: %WITHIN% snpirc| RC ON NPI; snpicomm| COMM ON NPI;
%BETWEEN% snpirc ON VAR; snpicomm ON VAR;
Is it possible to run this model without a twolevel random analysis? As it does not work with a TYPE= TWOLEVEL analysis either.
Putting RC and COMM on the Within list says that they don't vary across Between units and this is a contradiction to saying that you have random slopes for those DVs. If you have random slopes, they will vary over clusters. So remove RC and COMM from the Within list.