Message/Author |
|
|
I am trying to run a 2-level, random effects model with a random slope at the within level (a ON b) and using that slope to predict a categorical outcome (c) at the between level. I would like to use latent variable decomposition for a and b. Starting with this code: ANALYSIS: TYPE IS TWOLEVEL RANDOM; ESTIMATOR = MLR; MODEL: %WITHIN% slope | a ON b; %BETWEEN% c ON a b slope; a WITH b slope; b WITH slope; Caused an error: latent variable decomposition of an x variable (b) is not available unless it is treated as a y variable by mentioning its variance. However, I get the same error with this code: %WITHIN% slope | a ON b; b; I also tried your strategy noted here: https://tinyurl.com/y8mytnx8 with this code: %WITHIN% fw_b BY b; b@0; fw_a BY a; a@0; slope | fw_a ON fw_b; %BETWEEN% fb_b BY b; b@0; fb_a BY a; a@0; c ON slope fb_a fb_b; slope WITH fb_a fb_b; fb_a WITH fb_b; The model "runs" but says the estimated within covariance matrix cannot be inverted and so computation could not be completed. Suggestions (other than moving to ESTIMATOR=BAYES)? |
|
|
The best approach is to move to Bayes; ML is not natural for this. |
|
Sarah Victor posted on Saturday, October 06, 2018 - 10:49 am
|
|
|
Thank you for the prompt reply! That was my fear, unfortunately - we are interested in looking at an interaction between the within-person slope (latent variable) and an observed binary variable using the XWITH command, and then using that interaction term as a predictor, but it seems like that is not possible with Bayes |
|
|
If your binary is exogenous, you can use a 2-group analysis to capture the interaction. |
|
|
I'm sorry, I mis-wrote - I would actually like to create an interaction between the within-person slope (latent variable) and an observed *interval* variable using XWITH, and then that interaction term would be used as a predictor of the *binary* outcome. So the interaction itself is two dimensional/interval variables, one latent and one observed. |
|
|
Then you are in luck if you can wait a bit. The forthcoming Mplus Version 8.2 will have XWITH for Bayes. |
|
Back to top |