# Release of CmdStan 2.37.0

**URL:** <https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314>\
**Category:** Announcements\
**Created:** [September 2, 2025, 4:20pm UTC](https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314 "2025-09-02T16:20:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![WardBrian](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wardbrian/32/12078_2.png) [@WardBrian](https://discourse.mc-stan.org/u/WardBrian)\
**Post date:** [September 2, 2025, 4:20pm UTC](https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314/1 "2025-09-02T16:20:35Z")

</div>

We are very happy to announce that CmdStan 2.37.0 is out!

This release cycle brings improvements to Stan’s constrained types, quality-of-life improvements to CmdStan, and many stability improvements and bug fixes. Thank you to all the developers who contributed to this release!

For details, see the blog post: [Release of CmdStan 2.37 – The Stan Blog](https://blog.mc-stan.org/2025/09/02/release-of-cmdstan-2-37/)

---

<div class="post-metadata">

**Author:** ![aakhmetz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/aakhmetz/32/18672_2.png) [@aakhmetz](https://discourse.mc-stan.org/u/aakhmetz)\
**Post date:** [September 3, 2025, 1:00am UTC](https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314/2 "2025-09-03T01:00:04Z")

</div>

Thank you!

I am sorry, but I didn’t understand how to use, for example, this one and what it means: `<transform>_unconstrain`. Are there any examples?

---

<div class="post-metadata">

**Author:** ![WardBrian](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wardbrian/32/12078_2.png) [@WardBrian](https://discourse.mc-stan.org/u/WardBrian)\
**Post date:** [September 3, 2025, 2:37pm UTC](https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314/3 "2025-09-03T14:37:18Z")

</div>

Starting in this version, there are functions available for each of the built-in transforms. For example, you have long been able to declare a `simplex[N] theta;`. Now, you can call the functions `simplex_jacobian` (or `simplex_constrain`, which does the same transform but does not perform a change of variables adjustment) that takes an unconstrained vector of length N-1 and returns an N-simplex, or `simplex_unconstrain` which is the inverse operation.

These are useful in some situations where you want to have several constrained variables of different sizes – you can declare one parameter that has the size you need in total, and then constrain slices of that parameter. @mitzimorris used this trick in [her case study on the sum to zero vector](https://mc-stan.org/learn-stan/case-studies/sum_to_zero_vector.html#model-2-the-bym2_multicomp-model-freni-sterrantino-et-al-2018), but she had to write the `sum_to_zero_constrain` function herself to do it. Now, Stan gives it to you out of the box

---

<div class="post-metadata">

**Author:** ![mhollanders](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mhollanders/32/17623_2.png) [@mhollanders](https://discourse.mc-stan.org/u/mhollanders)\
**Post date:** [September 3, 2025, 11:59pm UTC](https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314/4 "2025-09-03T23:59:07Z")

</div>

FWIW, I have an example here of the functions to produce multiple simplexes in a matrix. For each group `m` I need a simplex of size `J[m]`. So I first produce a vector of probabilities that’s size `sum(J - 1).`

```stan
parameters {
  vector[J_sum - M] u; // unnormalised entry probabilities
}

```

Then in the transformed parameters I do the following, slicing out of `u` what I need for each group `m`:

```stan
transformed parameters {
  matrix[J_max, M] beta; // matrix of entry probabilities (simplexes)
  for (m in 1:M) {
    beta[:J[m], m] = simplex_jacobian(u[sum(Jm1[:m - 1]) + 1:sum(Jm1[:m])]);
  }
}

```

Now in the model block I can put a Dirichlet prior on the simplex in the matrix `beta`. Hope this helps!

EDIT: In my original post I defined the unnormalised probabilities as `vector<lower=0, upper=1>[J_sum - M] u`, but the lower and upper constraints shouldn’t have been there.

---

<div class="post-metadata">

**Author:** ![WardBrian](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wardbrian/32/12078_2.png) [@WardBrian](https://discourse.mc-stan.org/u/WardBrian)\
**Post date:** [September 4, 2025, 2:48pm UTC](https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314/5 "2025-09-04T14:48:57Z")

</div>

We’ve updated the tarballs associated with this release this morning after we noticed a build machine issue had lead to the wrong version being reported by `stanc –version`. No code has changed, and there’s no reason explicitly why someone would need to re-download if they already have, I just wanted to note it here in case someone was wondering why the files had changed

---

<div class="post-metadata">

**Author:** ![WardBrian](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wardbrian/32/12078_2.png) [@WardBrian](https://discourse.mc-stan.org/u/WardBrian)\
**Post date:** [November 28, 2025, 6:56pm UTC](https://discourse.mc-stan.org/t/release-of-cmdstan-2-37-0/40314/6 "2025-11-28T18:56:53Z")

</div>

9 posts were split to a new topic: [Differences in simplex constraining function vs normal simplex](https://discourse.mc-stan.org/t/differences-in-simplex-constraining-function-vs-normal-simplex/40686)
