We are very happy to announce that the 2.38.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 focused on stability and usability improvements, with a few new features and a lot of work under the hood for upcoming features.
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
Compiler usability improvements
The Stan compiler’s job is primarily to turn Stan code into C++ code, but a very close second is to turn invalid Stan code into error messages. Both of these functionalities saw improvements this version.
The C++ code generation saw several changes to try to improve compatibility with different compilers, avoid bad numeric properties that can arise when mixing integers into function calls expecting reals, and avoid some issues for user-defined functions that accepted complicated tuples or used names that are common in other C++ code.
On the warning-and-error front, almost all the messages that the compiler can emit were given a once-over for wording consistency and clarity. Additionally, supported terminals can now display the messages in color!

Finally, the compiler build now also provides autocomplete scripts for PowerShell, zsh, and bash. If you download and source these in your shell profile, you can press Tab to suggest flags:

New functions for the Wiener first passage time distribution
After significant effort by Stan developers Franziska Henrich, Steve Bronder, and Bob Carpenter, Stan now has support for CDF and CCDF functions for the wiener distribution family. These functions do not asymptote at 1, but rather at the probability to hit the top boundary, so they are called wiener_l[c]cdf_unnorm to reflect this.
Documentation is available here.
Bug fixes! Other changes!
There have been various other bug fixes and usability improvements this release. Thank you to everyone who reported a bug in the last few months!
jacobian is now a reserved word in the language.
While not quite ready for a release, a lot of other work has been in-progress on the embedded Laplace approximation feature. We hope to get this in your hands soon!
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.
