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 | Legacy R interface to Stan. (For new projects, consider using CmdStanR.) |
Python | PyStan | Legacy Python interface to Stan. (For new projects, consider using CmdStanPy.) |
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 and C++ compiler.) |
R | rstanarm | Provides stable, efficient Stan versions of R model-fitting packages. Installs easily 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. |
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. |