john posted on Sunday, December 05, 2004 - 7:00 am
I wonder if it is possible to model random slopes for level-1 variables within Mplus multilevel SEM options when the data are cross-sectional and the level-2 variables do not represent level-1 equivalents? Best, John
Eva posted on Thursday, December 23, 2004 - 11:07 am
Dear Dr. Muthen, am I right that here's a contradiction between the first and the two last statements? The first is quoted from your introduction on ML modelling, I found the other ones concerning ML SEM in this forum:
1. "The disaggregated multilevel models estimated by Mplus contain random intercepts but, except for growth models, not random slopes."
2. By john on Sunday, December 05, 2004 - 07:00 am:
I wonder if it is possible to model random slopes for level-1 variables within Mplus multilevel SEM options when the data are cross-sectional and the level-2 variables do not represent level-1 equivalents? Best, John *************************************************
3. By Linda K. Muthen on Sunday, December 05, 2004 - 11:30 am:
Yes, this is possible. *************************************************
Is it possible to model a random slope in TYPE=COMPLEX? There doesn't seem to be any examples of TYPE=COMPLEX examples in the manual. If it is possible to do, how would I write the syntax in the MODEL command if Y is regressed on X and I suspect that it has a random slope that is moderated by Z how?
No, we don't have examples of TYPE=COMPLEX because TYPE=COMPLEX can be added to most examples. If you look at the table under the ESTIMATOR option in the Mplus User's Guide, you can see which analysis types can be used together. You will see that COMPLEX and RANDOM can be used together.
TYPE=RANDOM is required when the model contains random effects defined using the | symbol. See Chapter 16 of the users' guide for more information.
The difference in sample size is likely due to cases with missing on covariates being removed from the analysis with TYPE=RANDOM. With TYPE=GENERAL COMPLEX, this is not done because the results are the same if the model is estimated conditioned on the covariates or not. With TYPE=RANDOM, this is not the case.
I am running a two-level CFA. We are interested in examining how covariance/correlation between two within-level factors varies across the 2nd level units. I understand that we can run a random slope analysis where we regress one factor on the other but we would like to examine the between-level variance of the covariance/correlation (as we don't assume that one factor has an effect on the other. Instead, we assume that they covary, and the strength of covariation/correlation might be different across the 2nd level units). Is there a way to do it?
No, the model is estimated assuming psi is equal across clusters. You can save only the factors scores.
The two values you see are the between part of the latent variable decomposition of your observed variables that are not on the WITHIN or BETWEEN list and their standard errors.
Lucy Morgan posted on Monday, January 21, 2013 - 12:26 pm
I am running a multilevel model using care assistant variables at level1 (N = 186) and manager variables at level 2 (N = 37). I am trying to add random slopes for level 1 variables and keep getting the following error message for CAIDIM, and CAIjG:
SERIOUS PROBLEM IN THE OPTIMIZATION WHEN COMPUTING THE POSTERIOR DISTRIBUTION. CHANGE YOUR MODEL AND/OR STARTING VALUES.
An example of my code is
ANALYSIS: TYPE = TWOLEVEL RANDOM; ESTIMATOR IS ML; ALGORITHM = INTEGRATION;
MODEL: %WITHIN% wealth BY S1_1 S1_5 S1_12 S1_14 S1_18; relat BY S1_2 S1_4 S1_13 S1_15 S1_19; fame BY S1_6 S1_8 S1_9 S1_11 S1_16; commun BY S1_3 S1_7 S1_10 S1_17 S1_20; S1_8 WITH S1_9; S1_6 WITH S1_11; S1_8 WITH S1_11;
CA_Inter ON commun wealth relat fame CAExt2 CAIjG CAIjB;
b1 | CA_Inter ON CAIDIM;
I have checked through the forum but cannot find any replies to the same problem, so I was wondering if you could help me as I *think* I have specified the model correctly but don't have a clue how to go about changing starting values!
I'd like to examine both within and cross-level effects in a two level longitudinal model in which there are several level 2 predictors, a level 1 predictor, and a level 1 covariate. I am familiar with example 9.2 in the M plus manual for estimating cross level effects. However, this example only models one cross-level effect. Two issues, the first related to the example, and the second related to interpreting output when there are cross-level effects:
1) In estimating cross-level effects involving the Level 1 predictor (level 2 predictor * level 1 predictor), can you control for the cross-level effect involving a level 1 covariate (level 2 predictor * level 1 covariate), rather than simply controlling for the level 1 effect of the covariate?
2) For some reason, the code for cross-level effects seems to be incompatible with the code used for modeling level 1 effects. Is that because the code for the cross-level effects automatically calculates level 1 effects (and thus, a statement to model level 1 effects would be redundant)? Also, where would I find statistics for the level 1 effects, since these do not seem to be included in the output when cross-level effects are modeled? Would be the intecepts for the level 1 variables?
Thank you for your response. To make sure that I understand re: #2, the statement "s | y on x" defines a random level 1 effect, and "y on x" in the level 1 (within) portion of the model statement defines a fixed level 1 effect, correct?
To clarify, which coefficient in the output represents a random level 1 effect (the beta for a random effect of a level 1 variable)?
Where can I find the mean and variance of slopes in a random coefficients model, and is the mean the appropriate representation of these level 1 effects? In other words, if I am interested in assessing the significance of a slope, where do I find this information?
Examining the between level output, I see cross-level coefficients, correlations, intercepts, and residual variances. I suppose you are speaking of the intercept and residual coefficients when you refer to the mean and variance (since the intercept would be the value of the slope at the average value of all grand mean centered level 2 variables?)
If you have regressed the mean and variance of the random coefficients on a covariate, then the model parameters are an intercept and residual variance. If this does not help, send the output and your license number to firstname.lastname@example.org so I can see what you are looking at.
The Mplus approach is in line with standard formulas for twolevel modeling. You write a level-1 equation where some coefficients are designated as random and then on level-2 they are variables (varying across level-2 units) for which you can estimate variances and relationships. Same if you have a 3-level situation. You can on level-2 designate some coefficients as random and they are then variables on level-3.
It follows that if you designate a slope for a level-2 predictor to be random you need to have a level-3 on which that random slope varies.
See the Raudenbush-Bryk 2002 book; this background should be active knowledge when using the more general multilevel modeling of Mplus.
You won't see the R&B book showing a two-level model with a level-2 equation that has random coefficients.
OK, thank you. This actually makes a lot of sense, particularly this point: "It follows that if you designate a slope for a level-2 predictor to be random you need to have a level-3 on which that random slope varies."
That does make sense.
JIAYUN JIN posted on Monday, August 12, 2013 - 6:06 am
I am running a two level model for count outcome, but when I add random slopes for four level-1 variables, mplus takes a lot of time. I have tried to add them one by one to see if they are significant, and they are. my command is below: VARIABLE: NAMES ARE resid intnum intage intgdr resage resgdr resedu resint nopin; USEVARIABLES ARE intnum resage resgdr resedu resint nopin; WITHIN = resage resgdr resedu resint; CLUSTER = intnum; COUNT IS nopin;
ANALYSIS: TYPE = twolevel random; ALGORITHM = INTEGRATION; INTEGRATION=MONTECARLO(5000); MODEL: %WITHIN% randoms1|nopin ON resage; randoms2|nopin ON resgdr; randoms3|nopin ON resedu; randoms4|nopin ON resint;
would you please help me to see what is the problem? thank you so much!
Greetings, I am estimating a 3-level model with latent aggregation of manifest variables (i.e. all my variables are observed, measured at L1, and I use latent aggregation to bring that up to L2 and L3).
I want to test if a Level 3 predictor has an impact on the slopes of L1 and L2 regressions (i.e. random slopes) but for some reason cannot use random slopes for similar effects modelled at both L1 and L2... For example:
%within% s1 | x on y; %between L2% s2 | x on y; %between L3% s1; s2; [s1]; [s2]; s1 on w; s2 on w;
It also seems that I cannot have y and x only at 2 levels and need to model their variances at L3. Also, for some reasons, the model does not work when I have missing values on y.