I aim to investigate stabilities of random effects (specifically random slopes) across waves of data collection. I was wondering if this was possible using multivariate brms models.
Specifically, it would be desirable to estimate a model including random slopes and random intercepts in three datasets simultaneously and then correlate the random slopes across datasets.
However, I believe brms requires all variables to be in the same data set (and datasets have different lengths across waves). As a solution that may work, I ordered assessments between waves and created separate variables for each wave (which leads to many NAs). Because data from waves should be independent, I set rescor to FALSE.
wave1 ← bf(dat1_y ~ dat1_x + (dat1_x|p|id))
wave2 ← bf(dat2_y ~ dat2_x + (dat2_x|p|id))
wave3 ← bf(dat3_y ~ dat3_x + (dat3_x|p|id))
fit_brm ← brm(wave1+wave2+wave3+set_rescor(FALSE), data = dat)
Does this approach strike you as reasonable for estimating correlations between random slopes across waves? Is there a more elegant way to specify that three separate datasets are used?