Stan Toolkit
A curated collection of tools and interfaces to help you work effectively with Stan across various programming environments and stages of your modeling workflow.
Language-Specific Stan Interfaces
Write, compile, and run Stan models directly within your programming environment.
Language | Tool | Description |
---|---|---|
R | CmdStanR | Interface to Stan for R, based on CmdStan. Recommended interface for R users. |
Python | CmdStanPy | Interface to Stan for Python, based on CmdStan. Recommended interface for Python users. |
Web | Stan Playground | Browser-based editor and runtime environment for Stan models. Highly recommended for new users. |
Julia | Stan.jl | Interface to Stan for Julia users. |
MATLAB | MatlabStan | Interface to Stan for MATLAB users. |
Shell | CmdStan | Command-line interface to Stan, usable from any shell environment. |
R | RStan | R interface to Stan. |
Python | PyStan | Legacy Python interface to Stan. |
For detailed installation instructions see Getting Started.
High-Level Modeling Interfaces
Simplify model specification in R.
Language | Tool | Description |
---|---|---|
R | brms | Use extended lme4 -like formula syntax to specify and fit multivariate and multilevel models in Stan. Requires CmdStanR or RStan, plus C++ compiler. |
R | rstanarm | Provides robust and efficient pre-compiled Stan versions of R model-fitting packages. Easily installed from CRAN, no C++ compiler needed. |
Visualization, Diagnostics, and Validation Tools
Validate, visualize, and compare fitted models to ensure robust results.
Language | Tool | Description |
---|---|---|
R | bayesplot | Plotting functions for posterior analysis, diagnostics, and model checking. |
R | loo | Efficient leave-one-out cross-validation and WAIC for Bayesian models. |
R | posterior | Tools for working with posterior distributions. |
R | projpred | Projection predictive variable selection for Bayesian models. |
Python | ArviZ | Exploratory analysis of Bayesian models with extensive visualization capabilities. |
Julia | ArviZ.jl | Julia interface to ArviZ for Bayesian analysis. |
Web | MCMC Monitor | Web-based tool for monitoring MCMC diagnostics. |
Developer Tools and APIs
Access Stan’s computational backend for advanced applications and development.
Language | Tool | Description |
---|---|---|
C++ | Stan Math Library | Automatic differentiation and mathematical functions used by Stan. |
Multiple Languages | BridgeStan | Library providing bindings to a model’s log densities, gradients, and more for C++, Python, Julia, R, and Rust. |
R | rstantools | Tools for developers of R packages interfacing with Stan. |
OCaml | stanc3 | The Stan compiler and programatic tools for manipulating Stan programs. |
Editor and IDE Support
Enhance your coding experience with Stan language support in your favorite editor.
Editor/IDE | Tool | Description |
---|---|---|
RStudio | Built-in Support | RStudio 1.2+ includes Stan syntax highlighting and code snippets. (Source code) |
Visual Studio Code | Stan VSCode Extension | Stan language support with syntax highlighting, autocompletion, and snippets. |
Emacs | stan-mode | Major mode for Stan with syntax highlighting and indentation. |
Vim | stan-vim | Syntax highlighting, indentation, and code folding for Stan in Vim. |
Atom | language-stan | Stan language support in Atom editor. |
Sublime Text | SublimeStan | Syntax highlighting for Stan in Sublime Text. |
JupyterLab | jupyterlab-stan-highlight | Syntax highlighting for Stan code blocks in JupyterLab. |
Javascript | Prism Highlight.js |
Lightweight syntax highlighting library - (Source code). Syntax highlighter written in javascript - (Source code) |
Markdown Editors | Pandoc Pygments |
Stan syntax highlighting for document formats. (Source code) Python highlighter for Stan code blocks (Source code) |
LaTeX | lstbayes | LaTeX listings for Stan syntax highlighting. |
Software Packages built on Stan
Language | Tool | Description |
---|---|---|
Python, R | PROPHET | Forecasting at scale for time series data. |
R | blavaan | R package for Bayesian latent variable analysis. |
R | rethinking | Software for book Statistical Rethinking |
Additional R packages on CRAN which are built on Stan can be found in the reverse links from the packages rstan and rstanarm.