# Implementation of the 'ordered' type

**URL:** <https://discourse.mc-stan.org/t/implementation-of-the-ordered-type/9019>\
**Category:** Developers\
**Created:** [May 29, 2019, 10:08am UTC](https://discourse.mc-stan.org/t/implementation-of-the-ordered-type/9019 "2019-05-29T10:08:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elizaveta\_Semenova](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/elizaveta_semenova/32/1350_2.png) [@Elizaveta\_Semenova](https://discourse.mc-stan.org/u/Elizaveta_Semenova)\
**Post date:** [May 29, 2019, 10:08am UTC](https://discourse.mc-stan.org/t/implementation-of-the-ordered-type/9019/1 "2019-05-29T10:08:15Z")

</div>

Hi all,

I am trying to reimplement the ‘ordered\_logistic’ regression in Julia’s Turing probabilistic programming language, but am obtaining no variation in the samples. I suspect it is due to the ordered nature of the cutpoints parameter. Can someone please point me at the implementation of the ‘ordered’ type for Stan, so that I can mimic it in Julia? I have searched through stan-dev GitHub repository, but couldn’t find what I am looking for.

Thank you in advance,  
Liza

---

<div class="post-metadata">

**Author:** ![increasechief](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/increasechief/32/2039_2.png) [@increasechief](https://discourse.mc-stan.org/u/increasechief)\
**Post date:** [May 29, 2019, 7:14pm UTC](https://discourse.mc-stan.org/t/implementation-of-the-ordered-type/9019/2 "2019-05-29T19:14:35Z")

</div>

Here is the API documentation: [http://mc-stan.org/math/](http://mc-stan.org/math/).

---

<div class="post-metadata">

**Author:** ![Bob\_Carpenter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bob_carpenter/32/9230_2.png) [@Bob\_Carpenter](https://discourse.mc-stan.org/u/Bob_Carpenter)\
**Post date:** [June 4, 2019, 4:22pm UTC](https://discourse.mc-stan.org/t/implementation-of-the-ordered-type/9019/3 "2019-06-04T16:22:50Z")

</div>

> [@Elizaveta\_Semenova](#):
>
> Can someone please point me at the implementation of the ‘ordered’ type for Stan, so that I can mimic it in Julia?

The doc for all the transforms and inverse transforms, including Jacobians, is in the reference manual chapter on constrained parameters. Here’s the first page of the chapter:

> **[10 Constraint Transforms | Stan Reference Manual](https://mc-stan.org/docs/2_19/reference-manual/variable-transforms-chapter.html)**
>
> Stan reference manual specifying the syntax and semantics of the Stan programming language.
