Release of CmdStan 2.39

We are very happy to announce that the 2.39.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 the embedded Laplace approximation, new functions, and many fixes.

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

The embedded Laplace approximation

After a few additional improvements to the underlying algorithm, we’re releasing a suite of functions to perform an embedded Laplace approximation, in a similar flavor to what is done in the INLA and TMB packages. These functions approximate the marginal likelihoods and conditional posteriors that arise in latent Gaussian models. The idea is to integrate out the latent Gaussian variables with a Laplace approximation and then perform standard inference on the hyperparameters. These functions give users a lot of flexibility when specifying a prior covariance matrix and a likelihood function, although the approximation is not guaranteed to work well for an arbitrary likelihood.

Documentation for the embedded Laplace approximation is available here and here.

Some additional materials are available here, though please note that the syntax has changed since these older materials were written.

This is a large feature, with a lot of credit to spread around. Particular thanks for these recent improvements go to Aki Vehtari, Steve Bronder, and Charles Margossian.

New yule_simon distribution

This new discrete distribution was contributed by Zhi Ling with PMF, CDF, CCDF, and RNG functions available.

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!

Various error messages output by the compiler were improved.

The gamma_lccdf function was made more numerically stable.

Added a converged__ column to the output of the optimization algorithms,
which documents why the optimization algorithm halted. A string explanation
is also added as a comment.

Length-1 tuples can now be declared using a trailing comma, e.g. tuple(real, ) x = (3.14, );. This is primarily valuable for using tuples with the embedded Laplace approximation feature, which uses tuples to pass arguments to user-defined callbacks.

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.

Leave a comment