User-facing R functions are provided to parse, compile, test, estimate, and analyze Stan models by accessing the header-only Stan library provided by the 'StanHeaders' package. The Stan project develops a probabilistic programming language that implements full Bayesian statistical inference via Markov Chain Monte Carlo, rough Bayesian inference via 'variational' approximation, and (optionally penalized) maximum likelihood estimation via optimization. In all three cases, automatic differentiation is used to quickly and accurately evaluate gradients without burdening the user with the need to derive the partial derivatives.

Maintainer: Ben Goodrich <benjamin.goodrich at>

Author(s): Jiqiang Guo*, Jonah Gabry*, Ben Goodrich*, Daniel Lee*, Krzysztof Sakrejda*, Trustees of Columbia University*, Oleg Sklyar* (R/cxxfunplus.R), The R Core Team* (R/pairs.R, R/dynGet.R), Jens Oehlschlaegel-Akiyoshi* (R/pairs.R), Hadley Wickham* (R/rtools.R), Joel de Guzman* (Boost), John Fletcher* (Boost), Thomas Heller* (Boost), Eric Niebler* (Boost)

Install package and any missing dependencies by running this line in your R console:


Depends R (>= 3.0.2), ggplot2(>=2.0.0), StanHeaders(>=2.15.0)
Imports methods, stats4, inline, gridExtra(>=2.0.0), Rcpp(>=0.12.0)
Suggests RUnit, RcppEigen, BH(>=1.62), parallel, KernSmooth, loo(>=1.0.0), shinystan(>=2.2.1), bayesplot, rstantools, rstudioapi, Matrix, knitr(>=1.15.1)
Linking to Rcpp(>=0.12.0), RcppEigen, BH(>=1.62), StanHeaders(>=2.15.0)

Package rstan
Task Views Bayesian
Version 2.15.1
Published 2017-04-19
License GPL (>= 3)
SystemRequirements pandoc
NeedsCompilation yes
CRAN checks rstan check results
Package source rstan_2.15.1.tar.gz