# Sampling problems in ordinal model

**URL:** <https://discourse.mc-stan.org/t/sampling-problems-in-ordinal-model/13631>\
**Category:** Modeling\
**Created:** [March 10, 2020, 1:46pm UTC](https://discourse.mc-stan.org/t/sampling-problems-in-ordinal-model/13631 "2020-03-10T13:46:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [March 10, 2020, 1:52pm UTC](https://discourse.mc-stan.org/t/sampling-problems-in-ordinal-model/13631/2 "2020-03-10T13:52:52Z")

</div>

Are you running rstan 2.19.2?

That version has a bug in the vectorized ordered\_logistic\_lpmf  
There is a temporary solution in the second post

> [@Ordered\_logistic\_lpmf](https://discourse.mc-stan.org/t/ordered-logistic-lpmf/9799):
>
> Starting from the example of Bürkner & Vuorre (Ordinal Regression Modells in Psychology: A Tutorial)page 12, I use ``stancode(fit\_sc1)``` to retrieve the following model: fit\_sc1 \<- brm(formula = rating ~ 1+ belief, data = stemcell, family = cumulative()) to understand what’s going on in Ordinal Models. Messing with the code I changed for (n in 1:N) { target += ordered\_logistic\_lpmf(Y[n]| mu[n], temp\_Intercept); } to target += ordered\_logistic\_lpmf(Y| mu, temp\_Intercept); to try th…

Seems like the first thing to look at. Not sure if that could be the culprit for the RAM usage.

---

_[View the full topic](https://discourse.mc-stan.org/t/sampling-problems-in-ordinal-model/13631)._
