# Setting prior for Dirichlet Model

**URL:** <https://discourse.mc-stan.org/t/setting-prior-for-dirichlet-model/24473>\
**Category:** Modeling\
**Tags:** dirichlet-multinomial, prior-choice, brms\
**Created:** [September 17, 2021, 5:12pm UTC](https://discourse.mc-stan.org/t/setting-prior-for-dirichlet-model/24473 "2021-09-17T17:12:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samfleischer](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@samfleischer](https://discourse.mc-stan.org/u/samfleischer)\
**Post date:** [September 17, 2021, 5:12pm UTC](https://discourse.mc-stan.org/t/setting-prior-for-dirichlet-model/24473/1 "2021-09-17T17:12:40Z")

</div>

How can I set distinct priors for each distributional parameter in a dirichlet model in BRMS?

Here is my code

```
model <- brm(outcome ~ 1, data = d, family = dirichlet(refcat = 'c'))

```

where d is a dataframe containing variables ‘a’, ‘b’, and ‘c’.

If I use

```
p <- c(prior_string("student_t(1, 2, 3)", class='Intercept'))

```

I am able to set the priors for both the a and b distributional parameters. How can I set each one individually?

Thank you!

---

<div class="post-metadata">

**Author:** ![samfleischer](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@samfleischer](https://discourse.mc-stan.org/u/samfleischer)\
**Post date:** [September 17, 2021, 5:27pm UTC](https://discourse.mc-stan.org/t/setting-prior-for-dirichlet-model/24473/2 "2021-09-17T17:27:12Z")

</div>

Found the answer… it is at the following link:

> [@Setting priors for categorical model with "dpar": priors do not correspond to any parameter](https://discourse.mc-stan.org/t/setting-priors-for-categorical-model-with-dpar-priors-do-not-correspond-to-any-parameter/9030):
>
> Please also provide the following information in addition to your question: Operating System: Ubuntu 19.04 brms Version: 2.9.0 (Github) I am trying to set priors for a categorical model following the guidance in [this post](https://discourse.mc-stan.org/t/setting-priors-for-multi-logistic-categorical-model/4510). My model is: mod0 \<- brm(Reason ~ Gender + Degree + Age.Months.Start.c + Months.Experience.Start.c + (1|Clinician), data = Data , family = categorical(link = “logit”), prior = priors) get\_priors returns useful information: prior class coe…
