# Family mixtures, brms

**URL:** <https://discourse.mc-stan.org/t/family-mixtures-brms/18483>\
**Category:** brms\
**Created:** [October 7, 2020, 10:37pm UTC](https://discourse.mc-stan.org/t/family-mixtures-brms/18483 "2020-10-07T22:37:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MartynaPlomecka](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MartynaPlomecka](https://discourse.mc-stan.org/u/MartynaPlomecka)\
**Post date:** [October 7, 2020, 10:37pm UTC](https://discourse.mc-stan.org/t/family-mixtures-brms/18483/1 "2020-10-07T22:37:00Z")

</div>

Hi!  
I try to fit a model to predict log-transformed, neurophysiological data by age (values [0 1]). All variables are centered, the prior is a Cauchy distribution (0,2.5).

```
fit<-brm(la ~ age, data = d,control = list(adapt_delta = 0.95, max_treedepth=15),cores=4,warmup=1500, iter=3000, sample_prior=T, prior=prior1)

```

pp\_check gives the following output:  
 ![M2](https://canada1.discourse-cdn.com/flex030/uploads/mc_stan/original/2X/c/c0f8fc2f32f417486589952b6af9a7bf58b85f1f.png)

Do you have any idea which family could be used to better describe this distribution? I tried mixture(gaussian,gaussian), which gave very bad results.

Thanks!

---

<div class="post-metadata">

**Author:** ![scholz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/scholz/32/14298_2.png) [@scholz](https://discourse.mc-stan.org/u/scholz)\
**Post date:** [October 8, 2020, 1:07pm UTC](https://discourse.mc-stan.org/t/family-mixtures-brms/18483/2 "2020-10-08T13:07:03Z")

</div>

Hey @MartynaPlomecka,  
I think instead of looking at your data and finding a distribution that matches it you should think about your data generating process and use the distribution that best matches that.  
You could use the [brms families list](https://rdrr.io/cran/brms/man/brmsfamily.html) as a starting point.  
There is also the [Parameterization of Response Distributions vignette](https://cloud.r-project.org/web/packages/brms/vignettes/brms_families.html).

Eg. If you have discrete outcomes, don’t use a continuous likelihood, if you have negative values, don’t use a distribution that’s only positive and so on.
