Is it currently possible to estimate heterogeneity in residual correlations by groups using mixed effects with brms?
I’m interested in estimating a multivariate individual-participant data meta-analysis using brms to examine variability in correlation matrices among a set of variables across samples.
For example, I’d like to be able to estimate random effects for the residual correlation parameters for the following model.
library(brms)
d <- psych::bfi |>
transform(education = ifelse(is.na(education), "NA", education)) |>
subset(select = -c(gender, age)) |>
na.omit()
m <- brm(
bf(mvbind(A1, A2, A3, A4, A5) ~ (1 | education)) +
set_rescor(rescor = TRUE),
data = d,
cores = 8,
threads = 2
)