Message/Author 

Shuwen Tang posted on Friday, November 02, 2012  10:08 am



I want to examine a twolevel model with random slopes. Usually I just use the "S  y on X" statement in the within model. But this time I want to use the withinpart of X as the predictor. Instead of groupmeancentering X, I would like to use the latent variable approach. I tried the following syntax: %WITHIN% FXw by x @1; x@0; S Y ON FXw ; %BETWEEN% FXb by x@1; x@0; S Y on T; I got the error message saying that "THE ESTIMATED WITHIN COVARIANCE MATRIX COULD NOT BE INVERTED." Is there anything fundamentally wrong with this model? I appreciate your thoughts and input! 


See the third part of Example 9.2 where the input for this is shown. 

Shuwen Tang posted on Friday, November 02, 2012  4:00 pm



Thanks, Linda. In the example 9.2, I can only get an overall interaction estimation. What we want to see is to separate the interaction term into between and within parts. Do you have any ideas to get these using the latent variable approach, instead of groupmeancentering X? 

Shuwen Tang posted on Tuesday, November 06, 2012  10:12 am



Or, how to deal with the error message saying that "THE ESTIMATED WITHIN COVARIANCE MATRIX COULD NOT BE INVERTED." Is there anything fundamentally wrong with the model I mentioned above? Thanks. 


Regarding using only the within part of the latent variable decomposition as a covariate in the random slope, this is not possible. Regarding the error message, please send the output and your license number to support@statmodel.com. 

Shuwen Tang posted on Tuesday, November 06, 2012  12:22 pm



why it is not possible? Example 9.10 shows a model in which a within latent variable is used as a covariate in the random slope. How is our model different from that example, except that we only have one indicator for the latent factor? 


Please send the full output and your license number to support@statmodel.com. 


Try fixing x at 0.0001 on both levels. x@0.0001; 

John C posted on Monday, December 19, 2016  12:04 pm



Hello, I would like to do a crosslevel interaction model, i.e., I want to check if a clusterlevel variable predicts the “slope” of a withinlevel predictor. However, my outcome is binary. Can this be done? If so, is this the same specification as with a continuous outcome except for declaring the dependent variable as categorical? John C. 


That's right. 


Hello, I'm currently attempting to estimate a twolevel longitudinal model (data are clustered within person), and am modeling my syntax off of Example 9.16 in the Mplus 7.0 manual. I'd like to predict the random slope using another withinsubjects variable and tried the following syntax: %WITHIN% s  SC on trial; s on Phase; But received an error message stating that the latent variable declared on the between level cannot be used on the within level. Is there a way to specify both within and betweensubject variation for a random slope using this syntax? If not, is there a different example you suggest? Thank you in advance for your help! 


The random slope varies across the betweenlevel units, so no variation within. You can use the betweenlevel variation part of Phase to predict s on the Between level. 


Thank you for your reply. Is it possible to predict within level variation in random slopes using example 9.14? We are interested in examining differences in the rate of extinction over the course of two separate sessions (i.e., Phase). We thus included the trials for both sessions in one time variable and were hoping to structure our Level 1 analyses as follows: B0 = intercept B1 = linear effect of time B3 = moderator effect of phase B4 = linear time by phase interaction What we are struggling with now is how create the B4 term. Any suggestions are greatly appreciated. 


If you don't have too many time points within each phase you can do your growth modeling in singlelevel, wide format and let phase be represented via piecewise growth modeling  see UG ex 6.11. 

Back to top 