Heteroskedasticity - i.e. variance specific to each group, j, rather than a single variance for each group-varying parameter?

Hi,

How to have a variance for each group j rather than only for each group-varyng parameter?

Say I have just a single group-level parameter, estimated for each group say j = 1 \dots J. Assume J=10. How to estimate J (i.e. 10) variances then, one for each group? Rather than just a single variance, common to all groups…as default brms() seems to do?

Many thanks!

https://cran.rstudio.com/web/packages/brms/vignettes/brms_distreg.html#a-simple-distributional-model

1 Like

Thanks for this. Is saying sigma ~ group in the brms() code block the same as each group having its own sigma, \sigma_j?

Yes, but note that ~ group will imply dummy coding for group by default as per R base defaults. To estimate separate sigmas directly, use cell-mean coding via ~ 0 + group. Note that estimates of sigma will be on the log-scale by default.