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