Skip to content

About Stan

Stan is a state-of-the-art platform for statistical modeling and high-performance statistical computation. Thousands of users rely on Stan for statistical modeling, data analysis, and prediction in the social, biological, and physical sciences, engineering, and business.

Users specify log density functions in Stan's probabilistic programming language and get:

  • full Bayesian statistical inference with MCMC sampling (NUTS, HMC)

  • approximate Bayesian inference with variational inference (ADVI, Pathfinder)

  • penalized maximum likelihood estimation with optimization (L-BFGS)

Stan's math library provides differentiable probability functions & linear algebra (C++ autodiff). Additional R packages provide easy formula syntax to specify linear and generalized linear hierarchical models, posterior visualization, and leave-one-out cross-validation.

Get Started

Stan interfaces with the most popular data analysis languages (R, Python, shell, MATLAB, Julia, Stata) and runs on all major platforms (Linux, Mac, Windows). To get started using Stan begin with the Installation and Documentation pages.

Helping Out

Stan is an active and open developer community. The help-wanted and good-first-issue labels in our repositories try to highlight good places to get started, and we're happy to help more on our forums or Slack.

We have projects in C++, Python, R, OCaml, and more. If you want to help build future versions of Stan, we want to help you get started.

Citing Stan

We appreciate citations for the Stan software because it lets us find out what people have been doing with Stan and motivate further grant funding. See How to Cite Stan for more details.

Open Code & Reproducible Science

Stan is freedom-respecting, open-source software (new BSD core, some interfaces GPLv3). Stan is associated with NumFOCUS, a 501(c)(3) nonprofit supporting open code and reproducible science, through which you can help support Stan.

Popular repositories Loading

  1. stan stan Public

    Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.

    C++ 2.6k 373

  2. rstan rstan Public

    RStan, the R interface to Stan

    R 1k 266

  3. pystan2 pystan2 Public archive

    PyStan, the Python interface to Stan

    Python 922 188

  4. example-models example-models Public

    Example models for Stan

    HTML 777 478

  5. math math Public

    The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic model…

    C++ 766 191

  6. bayesplot bayesplot Public

    bayesplot R package for plotting Bayesian models

    R 435 84

Repositories

Showing 10 of 51 repositories
  • cmdstanpy Public

    CmdStanPy is a lightweight interface to Stan for Python users which provides the necessary objects and functions to compile a Stan program and fit the model to data using CmdStan.

    Python 162 BSD-3-Clause 70 32 2 Updated Feb 17, 2025
  • performance-tests-cmdstan Public

    Performance testing tools for use with CmdStan

    Python 8 8 4 0 Updated Feb 16, 2025
  • cmdstan Public

    CmdStan, the command line interface to Stan

    C++ 216 BSD-3-Clause 93 57 (2 issues need help) 5 Updated Feb 16, 2025
  • stan Public

    Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.

    C++ 2,632 BSD-3-Clause 373 140 (12 issues need help) 12 Updated Feb 16, 2025
  • stanc3 Public

    The Stan transpiler (from Stan to C++ and beyond).

    OCaml 143 BSD-3-Clause 48 84 (13 issues need help) 8 Updated Feb 16, 2025
  • loo Public

    loo R package for approximate leave-one-out cross-validation (LOO-CV) and Pareto smoothed importance sampling (PSIS)

    R 151 33 40 (1 issue needs help) 4 Updated Feb 14, 2025
  • cmdstanr Public

    CmdStanR: the R interface to CmdStan

    R 145 63 88 (2 issues need help) 4 Updated Feb 14, 2025
  • stan-dev.github.io Public

    Stan website built using Quarto, theming in repo quarto-config

    HTML 20 CC0-1.0 39 10 0 Updated Feb 13, 2025
  • docs Public

    Documentation for the Stan language and CmdStan

    TeX 38 115 86 (2 issues need help) 3 Updated Feb 13, 2025
  • quarto-config Public

    Custom stylesheets and scripts for use in our documentation and website

    CSS 0 BSD-3-Clause 0 1 0 Updated Feb 13, 2025