# How to give prior to ordered parameters, and also to simplex?

**URL:** https://discourse.mc-stan.org/t/how-to-give-prior-to-ordered-parameters-and-also-to-simplex/12041
**Category:** Modeling
**Tags:** techniques, specification
**Created:** [November 22, 2019, 5:28am UTC](https://discourse.mc-stan.org/t/how-to-give-prior-to-ordered-parameters-and-also-to-simplex/12041 "2019-11-22T05:28:32Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)
#### Post date: [November 25, 2019, 1:46pm UTC](https://discourse.mc-stan.org/t/how-to-give-prior-to-ordered-parameters-and-also-to-simplex/12041/8 "2019-11-25T13:46:10Z")

</div>

I would actually like @paul.buerkner to weigh in on this matter due to his `monotonic` paper. I asked a similar question (I believe!) in another [thread](https://discourse.mc-stan.org/t/monotonic-effect-sampling-error/11911) in this forum. In short, depending on what data (e.g., Likert scale 1-5) and if we have nobody answering 4, or 5, should we use, i.e., `Dirichlet(c(1,1,1,1))` or `Dirichlet(c(1,1,1))`?

> **Question 2**  
> **a)** If I have ordered categorical predictors from 1-5 and 4 has not been used should I still use ordered categorical in five levels, i.e., `factor(x, c("1", "2", "3", "4", "5"), ordered=TRUE)` ? My question is due to the `rls` variable above which is really 1-8, but the data has recorded only levels 1 and 2.  
> **b)** If yes, does the same apply when 5 has not been used above in **a)** , i.e., should I still use `factor(x, c("1", "2", "3", "4", "5"), ordered=TRUE)`?

As an example, if I model this ordered categorical variable:

```no-highlight
table(bdf$f6f_rls)
 1 2 3 4 5 6 7 8 
27 0 0 0 0 0 0 0

```

as `mo(f6f_rls)` in `brms` it bails when starting to sample:

```Error
  Exception: model159d46253acca_21c393ad993ab34f22af08399084b917_namespace::model159d46253acca_21c393ad993ab34f22af08399084b917: Jmo[i_0__] is 0, but must be greater than or equal to 1 (in 'model159d46253acca_21c393ad993ab34f22af08399084b917' at line 26)

```

Well, it’s not strange, it’s not monotonic in that sense, but it would be nice from a model specification point of view to be able to write `mo()` indicating that it should be a 1,...,x ordered categorical var.

---

_[View the full topic](https://discourse.mc-stan.org/t/how-to-give-prior-to-ordered-parameters-and-also-to-simplex/12041)._
