# Ragged array of simplexes

**URL:** <https://discourse.mc-stan.org/t/ragged-array-of-simplexes/1382>\
**Category:** Modeling\
**Created:** [July 24, 2017, 11:41pm UTC](https://discourse.mc-stan.org/t/ragged-array-of-simplexes/1382 "2017-07-24T23:41:54Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)\
**Post date:** [January 5, 2018, 8:11pm UTC](https://discourse.mc-stan.org/t/ragged-array-of-simplexes/1382/21 "2018-01-05T20:11:25Z")

</div>

I meant to say just `vector<lower=0>[K1 + K2]`; in general, the elements do not need to be ordered. The exponential prior corresponds to a gamma prior with a shape of 1 and a scale of 1, which implies the resulting simplex vector has a uniform distribution. You can use other shapes but the prior is on the thing that you declare in parameters rather than the simplexes that you declare in the transformed parameters or the model block.

Your example would not parse. There is a more complicated example at

> <https://github.com/stan-dev/rstanarm/blob/master/src/stan_files/functions/common_functions.stan#L41>

  
where `zeta` is what you call `gamma` and I am using the `segment` function to extract the next `nc` elements after `zeta_mark` from it.

---

_[View the full topic](https://discourse.mc-stan.org/t/ragged-array-of-simplexes/1382)._
