Stan (software)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Original author(s)Stan Development Team
Initial releaseAugust 30, 2012 (2012-08-30)
Stable release
2.21 / 2019 (2019)
Repository Edit this at Wikidata
Written inC++
Operating systemUnix-like, Microsoft Windows, Mac OS X
PlatformIntel x86 - 32-bit, x64
TypeStatistical package
LicenseNew BSD License

Stan is a probabilistic programming language for statistical inference written in C++.[1] The Stan language is used to specify a (Bayesian) statistical model with an imperative program calculating the log probability density function.[1]

Stan is licensed under the New BSD License. Stan is named in honour of Stanislaw Ulam, pioneer of the Monte Carlo method.[1]

Stan was created by a development team consisting of 34 members[2] that includes Andrew Gelman, Bob Carpenter, Matt Hoffman, and Daniel Lee.


Stan can be accessed through several interfaces:


Stan implements gradient-based Markov chain Monte Carlo (MCMC) algorithms for Bayesian inference, stochastic, gradient-based variational Bayesian methods for approximate Bayesian inference, and gradient-based optimization for penalized maximum likelihood estimation.

Automatic differentiation[edit]

Stan implements reverse-mode automatic differentiation to calculate gradients of the model, which is required by HMC, NUTS, L-BFGS, BFGS, and variational inference.[1] The automatic differentiation within Stan can be used outside of the probabilistic programming language.


Stan is used in fields including social science[5] pharmaceutical statistics[6], market research[7] and medical imaging[8].


  1. ^ a b c d e Stan Development Team. 2015. Stan Modeling Language User's Guide and Reference Manual, Version 2.9.0
  2. ^ "Development Team". Retrieved 2018-07-25.
  3. ^ Hoffman, Matthew D.; Gelman, Andrew (April 2014). "The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo". Journal of Machine Learning Research. 15: pp. 1593–1623.
  4. ^ Kucukelbir, Alp; Ranganath, Rajesh; Blei, David M. (June 2015). "Automatic Variational Inference in Stan". 1506 (3431). arXiv:1506.03431. Bibcode:2015arXiv150603431K. Cite journal requires |journal= (help)
  5. ^ Goodrich, Benjamin King, Wawro, Gregory and Katznelson, Ira, Designing Quantitative Historical Social Inquiry: An Introduction to Stan (2012). APSA 2012 Annual Meeting Paper. Available at SSRN 2105531
  6. ^ Natanegara, Fanni; Neuenschwander, Beat; Seaman, John W.; Kinnersley, Nelson; Heilmann, Cory R.; Ohlssen, David; Rochester, George (2013). "The current state of Bayesian methods in medical product development: survey results and recommendations from the DIA Bayesian Scientific Working Group". Pharmaceutical Statistics. 13 (1): 3–12. doi:10.1002/pst.1595. ISSN 1539-1612. PMID 24027093.
  7. ^ Feit, Elea. "Using Stan to Estimate Hierarchical Bayes Models". Retrieved 19 March 2019.
  8. ^ Gordon, GSD; Joseph, J; Alcolea, MP; Sawyer, T; Macfaden, AJ; Williams, C; Fitzpatrick, CRM; Jones, PH; di Pietro, M; Fitzgerald, RC; Wilkinson, TD; Bohndiek, SE (2018). "Quantitative phase and polarisation endoscopy applied to detection of early oesophageal tumourigenesis". arXiv:1811.03977 [].

Further reading[edit]

External links[edit]