I am happy to announce that the latest release candidates of CmdStan and Stan are now available on Github!
This release cycle brings the embedded laplace approximation, new functions, and many fixes.
You can find the release candidate for CmdStan here. Instructions for installing are given at the bottom of this post.
Please test the release candidate with your models and report if you experience any problems. We also kindly invite you to test the new features and provide feedback. If you feel some of the new features could be improved or should be changed before the release, please do not hesitate to comment.
The Stan development team appreciates your time and help in making Stan better.
If everything goes according to plan, the 2.40 version will be released next week.
Below are some of the highlights of the new release.
New options for 1d integration
Several new integration functions have been added:
integrate_1d_double_exponential, a variadic version of the existing 1-d integratorintegrate_1d_gauss_kronrod, a variadic function with a different quadrature rule
Preliminary documentation can be found here.
Matrix reshaping functions
New functions to_vector_array(matrix) -> array[] vector to_row_vector_array(matrix) -> array[] row_vector, as well as new overloads for to_matrix for arrays of (row-)vectors.
New poisson_binomial distribution
A new discrete PMF, CDF, CCDF, and RNG functions available.
Preliminary documentation is available here
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!
The same .stanfunctions can be #included multiple times without leading to errors about duplicated function definitions.
Updated the Math library to use Eigen 5.0.1
The vectorized RNGs were updated to fix a crash when given size-0 inputs.
The compiler has fewer dependencies, with a smaller binary size and improved speeds.
More details on all of the above and more are available in the preliminary release notes
How to install?
Download the tar.gz file from the link above, extract it and use it the way you use any Cmdstan release. We also have an online Cmdstan guide available at CmdStan User’s Guide .
If you are using cmdstanpy you can install the release candidate using
cmdstanpy.install_cmdstan(version='2.40.0-rc1')
With CmdStanR you can install the release candidate using
cmdstanr::install_cmdstan(version = "2.40.0-rc1", cores = 4)