I was wondering if there is any equivalent of the at.level function in brms, or in Stan? This function is handy for multivariate hierarchical models, in which the residual covariance should be estimated for some (but not all) combinations of variables. Basically I want to do a model like in which I estimate the residual covariance between a pair of male traits, and a pair of female traits, but not between male and female traits (since individual in my dataset never have a mixture of male and female traits, so I’d like to fix the residual covariance to zero and “tell” brms not to estimate it).
Currently, the residual correlation matrix in brms needs to be either fully estimated, set_rescor(TRUE), or completely set to zero, set_rescor(FALSE). This will be made more flexible in brms 3.0 which definitely won’t be ready within the next few months.
@paul.buerkner, is this still the case for the current version of brms (2.13.5)? I have a single level model with two predictors, x1 and x2. One predictor has some missing data, which I’d like to handle with a residual covariance between it and the other predictor. But I do not want the response variable y to share a residual covariance with either of the predictors. I was hoping to get away with something like the code below, but the outermost rescor statement seems to override the inner one.
Feels odd to revive this thread after 6 years, but I am lost here. I had a look at the documentation and discourse, and seems to me there is no solution yet for estimating R matrices separately each level. Do you know if this is possible now?