We are very happy to announce that the 2.36.0 release of CmdStan is now available on Github! As usual, the release of CmdStan is accompanied by new releases of Stan Math, core Stan, and Stanc3.
This release cycle brings new constrained types, improved diagnostics, and a new distribution for heavy-tailed count data.
Contributors, sponsors and donators
We would like to thank everyone that contributed to this release with their bug reports, feature or bug fix discussions, and code or code reviews.
Several issues in early versions of this release were caught and reported by the community, and we are grateful for their time and effort in improving Stan.
We would also like to thank all of our sponsors and donators who have supported us during this last release cycle and in years past. Thanks to the Flatiron Institute for providing us with the computing resources to run unit tests and build scripts for our repositories.
You can support Stan via NumFocus or the Github sponsorship program.
Release highlights
New constraints for stochastic matrices and zero-sum vectors
Three new constrained types have been added to Stan in this release:
column_stochastic_matrix: A matrix where each column is a simplexrow_stochastic_matrix: A matrix where each row is a simplexsum_to_zero_vector: A vector constrained to sum to zero
Easier user-defined constraints
Historically, users have implemented their own constraints by using target += or _lp functions to add the required Jacobian adjustments. This release adds a new statement, jacobian +=, and accompanying _jacobian functions to make it easier to implement user-defined constraints.
Besides being clearer in their intent, these new forms also allow the jacobian to be turned off when it is not needed, such as when finding a maximum likelihood estimate via optimization.
Improved diagnostics
The stansummary command bundled with CmdStan has been updated with newer versions
of the R-hat and ESS diagnostics based on the work in Rank-Normalization, Folding, and Localization: An Improved Rˆ for Assessing Convergence of MCMC (with Discussion).
New distribution: beta_neg_binomial
This distribution is useful for modeling heavy-tailed count data. Functions are available for the LPDF, CDF, LCDF, LCCDF, and RNG for this distribution.
Bug fixes! Other changes!
This release also contains a large number of bug fixes across all levels of the Stan ecosystem. Users of the Math library will need to update with care, as this release is accompanied by a major version bump of that submodule. Of note, C++17 will now be required to build Stan.
Some details are available in the release notes for each project:
How to install the new release?
Download the tar.gz file here, extract it, and use it the way you use any Cmdstan release. We also have an online Cmdstan guide available at https://mc-stan.org/docs/cmdstan-guide.
If you are using cmdstanpy you can install using
cmdstanpy.install_cmdstan()
With CmdStanR you can install using
cmdstanr::install_cmdstan()
Note that both cmdstanpy and CmdStanR users are recommend to update their versions of those libraries when installing a new CmdStan to get support for newer features and the latest bug fixes.
