← Back to all sparks
C

cmdstanr

ANALYTICS
Velocity0.0

Lightweight R interface to CmdStan for fitting Bayesian models

cmdstanr keeps adding fast approximations beside full HMC, and fighting Windows toolchains.

bayesian inferencestanapproximate inferencewindows toolchainr interface
Current state
cmdstanr is the lightweight R interface to CmdStan, shelling out to the Stan binary rather than embedding it. The visible releases pair inference-method expansion, with laplace and pathfinder arriving in 0.7.0, against a continuous effort to make installation work on Windows. The most recent releases are dominated by CmdStan version compatibility and numerical fixes in the loo path.
Where it's heading
The package tracks CmdStan closely, and its own work concentrates in two places. One is broadening the method surface so approximate inference sits beside sampling on the same object, extended in 0.8.0 by letting a completed fit supply initial values for the next run. The other is cutting installation friction, which reaches its conclusion in 0.9.0 with RTools45 supported and no additional toolchain setup needed on Windows. Dependency trimming, such as dropping RcppEigen for direct Eigen interop, runs alongside both.
Prediction
The cadence is a CmdStan release followed by a compatibility release here, so expect the next to track a newer CmdStan and continue the effective-sample-size numerical work in the loo method.

Recent moves

  1. 4mo ago

    RTools45 support; Windows needs no extra toolchain setup

    Removes the long-standing Windows toolchain detour: RTools now works as-is on CmdStan 2.35 and later, with RTools45 supported. The rest is numerical stability work in the loo effective-sample-size calculation and a dozen contributed bug fixes.

    View source ↗
  2. 4mo ago

    Bugfix release: SUNDIALS linking, Windows paths, RTools

    A pure bugfix release covering SUNDIALS/KINSOL linking, aarch64 RTools, Windows path changes and unconstrain_draws() sizing. No new surface.

    View source ↗
  3. 4mo ago

    CmdStanFit objects usable as initial values; RcppEigen dropped

    Lets a completed CmdStanFit be passed directly as initial values, which makes chaining a cheap approximate fit into a full sampling run a single argument rather than manual extraction. Also adds CmdStan 2.34/2.35 compatibility, save_metric and save_cmdstan_config, and drops the RcppEigen dependency for direct Eigen interop.

    View source ↗
  4. 2y ago

    Bugfix release with dedicated hpp generation step

    A small bugfix release whose only forward-looking piece is a separate hpp generation step added for future CmdStan compatibility. Otherwise CI and retry plumbing.

    View source ↗
  5. 2y ago

    Laplace and Pathfinder inference methods added

    ⚡ SPARK

    Adds two approximate inference methods to the same CmdStanModel interface as sampling, which is the change that makes cmdstanr a workflow rather than a sampler front-end. The 0.8.0 ability to pass a fit as initial values completes the loop this release opened.

    View source ↗
  6. 2y ago

    jacobian argument enabled for optimization; assorted fixes

    Enables the jacobian argument for optimization and clears a run of issues around exposing Stan functions, user headers and model methods. Consolidation ahead of the method expansion in 0.7.0.

    View source ↗