I am happy to announce that the latest release candidates of Cmdstan and Stan are now available on Github!
This release cycle brings complex vectors and matrices, 6 new functions and 3 new distributions.
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 more efficient while maintaining a high level of reliability.
If everything goes according to plan, the 2.30 version will be released in about ten days.
Below are some of the highlights of the new release.
The Stan language gains three new types:
complex_matrix with a number of functions that support them:
Other utility functions:
- get_imag, get_real,
- cols, rows, num_elements, size,
- to_array_1d, to_matrix, to_row_vector, to_vector
fft() returns the Fourier transform of a vector, while
fft2() can be used for the 2-dimensional case of the Fast Fourier transform. The
inv_fft2() provide the respective inverse transforms. More details on the FFT functions are temporarily available here. The rest of the listed functions are all existing functions that were extended to support the new complex types.
In addition to these, two new functions were added that return complex vectors/matrices:
eigenvalues. See the next section for details.
Note that real vectors/matrices automatically promote complex vector/matrices, which means that supplying a vector to
fft(complex_vector) will work seamlessly, with no need to wrap the vector in a
eigenvalues returns the complex-valued vector of eigenvalues of the matrix A. The eigenvalues are repeated according to their algebraic multiplicity, so there are as many
eigenvalues as rows in the matrix. The eigenvalues are not sorted in any particular order.
eigenvectors returns the matrix with the complex-valued (column) eigenvectors of
the matrix A in the same order as returned by
The inverse of the regularized incomplete beta function. The return value
x is the value that solves
p = inc_beta(alpha, beta, x).
The log of the absolute value of the determinant of the symmetric, positive-definite matrix A. This function is faster when the input matrix is known to be symmetric and positive definite.
These functions return the L1 and L2 norms.
- Multivariate Student-t distribution, Cholesky parameterization:
- Wishart distribution, Cholesky Parameterization:
- Inverse Wishart distribution, Cholesky Parameterization:
fabs() function is now deprecated and will be removed in the 2.33.0 release (estimated to be released in June 2023). All usages of
fabs() can be replaced with
The Stan 2.30 release can not be used with the Rtools 3.5 toolchain on Windows. The recommended toolchain on Windows is Rtools40, unless you are using Stan with R 4.2+, in which
case Rtools42 should be used.
Toolchain support on Mac and Linux systems should remain unchanged.
- Downstream libraries were updated: Sundials to 6.1.1 and Boost to 1.78.0
.*, as well as
*now support the same input types. The support was not consistent in previous versions.
- Exposed an overload for
cumulative_sumwhich takes and returns an array of integers.
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 Redirecting…
If you are using cmdstanpy you can install the release candidate using
With CmdStanR you can install the release candidate using
cmdstanr::install_cmdstan(version = "2.30.0-rc1", cores = 4)
And then select the RC with
cmdstanr::set_cmdstan_path(file.path(Sys.getenv("HOME"), ".cmdstan", "cmdstan-2.30.0-rc1"))