Heterogeneous residual variance in animal model with using brms

Hi everyone,

I’m trying to use an animal model to estimate genetic variance changes across different ages:
For mcmcglmm package, I could build a model with residual variance to be heterogeneous by using rcov = ~us(trait):units, I was wondering how to set up heterogeneous residual in brms?

Thank you in advance for your help

Here’s the brms vignette on distributional regression:
https://cran.r-project.org/web/packages/brms/vignettes/brms_distreg.html

3 Likes

It’s really helpful! Thanks so much!

Hi, did this work for you? If so, how exactly did you specify the residual covariance structure in your model in brms syntax?

I used simga structure like this:

brm(y ~ x, sigma ~ x, data = my_data)

This allows residual variance to vary with x rather than constant
But I didn’t try to get the covariance with this