» Articles » PMID: 36568334

Stan: A Probabilistic Programming Language

Overview
Journal J Stat Softw
Date 2022 Dec 26
PMID 36568334
Authors
Affiliations
Soon will be listed here.
Abstract

Stan is a probabilistic programming language for specifying statistical models. A Stan program imperatively defines a log probability function over parameters conditioned on specified data and constants. As of version 2.14.0, Stan provides full Bayesian inference for continuous-variable models through Markov chain Monte Carlo methods such as the No-U-Turn sampler, an adaptive form of Hamiltonian Monte Carlo sampling. Penalized maximum likelihood estimates are calculated using optimization methods such as the limited memory Broyden-Fletcher-Goldfarb-Shanno algorithm. Stan is also a platform for computing log densities and their gradients and Hessians, which can be used in alternative algorithms such as variational Bayes, expectation propagation, and marginal inference using approximate integration. To this end, Stan is set up so that the densities, gradients, and Hessians, along with intermediate quantities of the algorithm such as acceptance probabilities, are easily accessible. Stan can be called from the command line using the package, through R using the package, and through Python using the package. All three interfaces support sampling and optimization-based inference with diagnostics and posterior analysis. and also provide access to log probabilities, gradients, Hessians, parameter transforms, and specialized plotting.

Citing Articles

A renewal-equation approach to estimating and infectious disease case counts in the presence of reporting delays.

Bajaj S, Thompson R, Lambert B Philos Trans A Math Phys Eng Sci. 2025; 383(2292):20240357.

PMID: 40078145 PMC: 11904616. DOI: 10.1098/rsta.2024.0357.


A tutorial on bayesian multiple-group comparisons of latent growth curve models with count distributed variables.

Bendler J, Reinecke J Behav Res Methods. 2025; 57(4):112.

PMID: 40064801 PMC: 11893654. DOI: 10.3758/s13428-025-02624-3.


A variational deep-learning approach to modeling memory T cell dynamics.

van Dorp C, Gray J, Paik D, Farber D, Yates A bioRxiv. 2025; .

PMID: 40060443 PMC: 11888226. DOI: 10.1101/2024.07.08.602409.


Survivor Average Causal Effects for Continuous Time: A Principal Stratification Approach to Causal Inference With Semicompeting Risks.

Comment L, Mealli F, Haneuse S, Zigler C Biom J. 2025; 67(2):e70041.

PMID: 40047176 PMC: 11887578. DOI: 10.1002/bimj.70041.


Hierarchical Multi-Dimensional Maturation Modeling to Isolate the Effects of Commercial Closure on a Great Lakes Fishery.

Feiner Z, Doll J, Dickinson B, Christie M Evol Appl. 2025; 18(3):e70075.

PMID: 40046161 PMC: 11880125. DOI: 10.1111/eva.70075.


References
1.
Lunn D, Spiegelhalter D, Thomas A, Best N . The BUGS project: Evolution, critique and future directions. Stat Med. 2009; 28(25):3049-67. DOI: 10.1002/sim.3680. View