# Brms Distributional Models vignette example giving weird results

**URL:** <https://discourse.mc-stan.org/t/brms-distributional-models-vignette-example-giving-weird-results/8425>\
**Category:** brms\
**Created:** [April 11, 2019, 4:03am UTC](https://discourse.mc-stan.org/t/brms-distributional-models-vignette-example-giving-weird-results/8425 "2019-04-11T04:03:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hershel\_Macaulay](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@Hershel\_Macaulay](https://discourse.mc-stan.org/u/Hershel_Macaulay)\
**Post date:** [April 11, 2019, 4:03am UTC](https://discourse.mc-stan.org/t/brms-distributional-models-vignette-example-giving-weird-results/8425/1 "2019-04-11T04:03:15Z")

</div>

Hi,

I’m trying to run the code in the vignette: “Estimating Distributional Models with brms”  
(2019-03-14, [https://cran.r-project.org/web/packages/brms/vignettes/brms\_distreg.html](https://cran.r-project.org/web/packages/brms/vignettes/brms_distreg.html)). I changed the numbers a bit for higher resolution/precision:

group \<- rep(c(“treat”, “placebo”), each = 1000)  
symptom\_post \<- c(rnorm(1000, mean = 10, sd = 3), rnorm(1000, mean = 0, sd = 1))  
dat1 \<- data.frame(group, symptom\_post)  
head(dat1)  
fit1 \<- brm(bf(symptom\_post ~ group, sigma ~ group), data = dat1, family = gaussian())  
summary(fit1)

This gives:  
Population-Level Effects:  
**Estimate Est.Error** l-95% CI u-95% CI Eff.Sample Rhat  
Intercept 0.06 0.03 -0.00 0.12 5689 1.00  
**sigma\_Intercept 0.01 0.02** -0.04 0.05 3934 1.00  
grouptreat 9.92 0.10 9.72 10.11 2610 1.00  
**sigma\_grouptreat 1.11 0.03** 1.04 1.17 3911 1.00

The effect sizes look good, but the sigmas should be 3 and 1, not 1 and 0, right? Why is this happening?

Thank you,

Hershel

- Operating System: Mac OS 10.13.6
- brms Version: brms\_2.8.0

---

<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 11, 2019, 6:49am UTC](https://discourse.mc-stan.org/t/brms-distributional-models-vignette-example-giving-weird-results/8425/2 "2019-04-11T06:49:31Z")

</div>

sigma is modeled on the log scale, which you also see at the start of the summary output.

---

<div class="post-metadata">

**Author:** ![Hershel\_Macaulay](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@Hershel\_Macaulay](https://discourse.mc-stan.org/u/Hershel_Macaulay)\
**Post date:** [April 11, 2019, 2:31pm UTC](https://discourse.mc-stan.org/t/brms-distributional-models-vignette-example-giving-weird-results/8425/3 "2019-04-11T14:31:20Z")

</div>

Oops, thank you!

-Hershel
