# Rstanarm like covariance priors in brms?

**URL:** <https://discourse.mc-stan.org/t/rstanarm-like-covariance-priors-in-brms/21787>\
**Category:** brms\
**Created:** [April 9, 2021, 12:05pm UTC](https://discourse.mc-stan.org/t/rstanarm-like-covariance-priors-in-brms/21787 "2021-04-09T12:05:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wds15](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wds15/32/908_2.png) [@wds15](https://discourse.mc-stan.org/u/wds15)\
**Post date:** [April 9, 2021, 12:05pm UTC](https://discourse.mc-stan.org/t/rstanarm-like-covariance-priors-in-brms/21787/1 "2021-04-09T12:05:37Z")

</div>

Hi!

I do like the way rstanarm writes down priors for variance components of random effects, but I don’t quite know how that can be expressed in brms. At the moment I specify for each random effect standard deviation a prior separatley, but I would like to specify a prior on the overall variance and use a dirichlet prior for allocating fractions of this to the individual components.

Is that possible in brms?

```
# so this is how my random effect prior often look like:
        prior(normal(0,0.5), class="sd", group="group1") +
            prior(normal(0,0.25), class="sd", group="group2")
# and a LKJ is used for the correlations

# how can I model the above through the sum of the variance of both random effects and a dirichlet to model the fraction assigned to each component?

```

Thanks a lot!

Best,  
Sebastian

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)\
**Post date:** [April 10, 2021, 10:30am UTC](https://discourse.mc-stan.org/t/rstanarm-like-covariance-priors-in-brms/21787/2 "2021-04-10T10:30:09Z")

</div>

This is not yet possible in brms and I want to do some more research on it to have good joint (default) priors in brms for random and fixed effects. Actually, there I will have a PhD student in Stuttgart starting soon who will work on these topics.
