Interfaces

Interfaces

ways to install and run Stan

Installation

Installation procedures vary according to your choice of preferred programming environment.

  • The core Stan C++ libraries and command line interface can be installed from conda

  • Source code and pre-built binaries for linux can be installed from the Github stan-dev releases page.

Stan Interfaces

The Stan modeling language and statistical algorithms are exposed through interfaces into many popular computing environments.

Actively supported interfaces

Unsupported interfaces

Programs written in the Stan modeling language are portable across interfaces.

Higher-Level Interfaces

RStanArm and brms provide R formula interfaces that automate regression modeling.

The main differences between these packages are that RStanArm uses precompiled models whereas brms compiles on the fly, and that they support slightly different classes of models and automated posterior analyses; both allow raw Stan output to be recovered and used directly.

Lower-Level Interfaces

The Stan Math Library provides differentiable special functions, probability densities, and linear algebra in C++.

The Stan Core Library includes the language source-to-source compiler, I/O, inference algorithms, and posterior analysis algorithms, all in C++.

Useful Tools

ShinyStan provides interactive visual summaries and advanced posterior analysis of MCMC output.

The bayesplot package is a ggplot2-based plotting library for graphing parameter estimates, MCMC diagnostics, and posterior predictive checks.

The rstantools package provides various tools for developers of R packages interfacing with Stan.

The loo package provides efficient leave-one-out cross-validation and WAIC calculations.

Stan Language Syntax Aware Editors

RStudio now recognizes .stan files and provides syntax highlighting, formatting, and checking.

Emacs

Vim has several plugins that offer syntax highlighting and support for Stan.

VSCode

Atom has a language definition plugin for Stan, which also provides the highlighting seen on GitHub.

Sublime Text

Jupyter Lab

Kate Editor

This highlighting is also the one used by the pandoc tool used by RMarkdown.

Javascript (Web)

Other