I want to estimate a model with repeated measures nested within patients nested within therapists, with a random slope for one of the cross-lagged effects with variances both between patients and between therapists. The code below won’t work since the variance for the slope (S*) is on both within- and between levels. Is it possible to also get an estimate for the random slope on the within level?
- you cannot label a random slope expression because it does not refer to a single parameter. S has a mean, variance, and relationships with other variables. So the labels should appear where these aspects of S are referred to.
I think it is probably easiest to do this as 3-level instead of having time in wide format. So use 2 cluster variables: Therapist and Patient. Then the S variance is easily specified on the 2 Between levels with the bar statement on Within.
The S* approach you use (see page 755 in the V8 UG) gives S variance on Within and Between but I am not sure how that turns out in this context. I don't know what error you got.
Thanks! The parameter labels was a mistake, I included them in one of my runs because I wanted to ensure that the slope was estimated with equal loadings for both paths (cY2 on cX1 and cY3 on cX2), but perhaps that is always the case? Anyway, the problem was solved in the UG passage that you referred to, by stating S* | cY2 on cX1 and S* | cY3 on cX2. Unfortunately, the model did not converge using ML, and apparently it is not possible to get within-level slope variances with Bayesian estimation yet?
Sorry for the double response here, but I forgot to mention that the 3-level option probably won't work since I am controlling for the effect of the prior value of the outcome variable. The model I am using is Hamaker's Random Intercept Cross-Lagged Panel model, and I assume it is not possible to use in 3-level format?
Your two-level approach with S* | ... should work in principle. I assume you have Cluster = therapist. The integration gets high-dimensional due to random slopes for latent variables so maybe that's your stumbling block; check Tech8 for negative Abs changes (see our TEch8 FAQ). Also, I don't see that your model has auto-regressions in it for your 2 DVs.
You can send the output for your best effort to Support along with your license number. It would be nice to have this random slope extension of the RI-CLPM going.