rstan v2.21.2


Monthly downloads



R Interface to Stan

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.

Functions in rstan

Name Description
expose_stan_functions Expose user-defined Stan functions to R for testing and simulation
sbc Simulation Based Calibration (sbc)
rstan_options Set and read options used in RStan
read_stan_csv Read CSV files of samples generated by (R)Stan into a stanfit object
stan Fit a model with Stan
rstan-internal Internal Functions and Methods
read_rdump Read data in an R dump file to a list
rstan.package.skeleton Create a Skeleton for a New Source Package with Stan Programs
rstan-package RStan --- the R interface to Stan
extract Extract samples from a fitted Stan model
stanfit-class Class stanfit: fitted Stan model
rstan_gg_options Set default appearance options
stan_rdump Dump the data for a Stan model to R dump file in the limited format that Stan can read.
set_cppo Defunct function to set the compiler optimization level
monitor Compute summaries of MCMC draws and monitor convergence
sflist2stanfit Merge a list of stanfit objects into one
stanc Translate Stan model specification to C++ code
loo.stanfit Approximate leave-one-out cross-validation
pairs.stanfit Create a matrix of output plots from a stanfit object
loo_moment_match.stanfit Moment matching for efficient approximate leave-one-out cross-validation (LOO)
log_prob-methods log_prob and grad_log_prob functions
stan_demo Demonstrate examples included in Stan
traceplot Markov chain traceplots
stan_model Construct a Stan model
plot-methods Plots for stanfit objects
stan_version Obtain the version of Stan
Plots ggplot2 for RStan
Diagnostic plots RStan Diagnostic plots
gqs Draw samples of generated quantities from a Stan model
stanmodel-class Class representing model compiled from C++
optimizing Obtain a point estimate by maximizing the joint posterior
summary-methods Summary method for stanfit objects
as.array Create array, matrix, or data.frame objects from samples in a stanfit object
sampling Draw samples from a Stan model
vb Run Stan's variational algorithm for approximate posterior sampling
rstan-plotting-functions RStan Plotting Functions
As.mcmc.list Create an mcmc.list from a stanfit object
extract_sparse_parts Extract the compressed representation of a sparse matrix
check_hmc_diagnostics Check HMC diagnostics after sampling
lookup Look up the Stan function that corresponds to a R function or name.
print Print a summary for a fitted model represented by a stanfit object
Rhat Convergence and efficiency diagnostics for Markov Chains
makeconf_path Obtain the full path of file Makeconf
No Results!

Vignettes of rstan

No Results!

Last month downloads


Encoding UTF-8
Type Package
Date 2020-07-27
License GPL (>= 3)
NeedsCompilation yes
LinkingTo Rcpp (>= 0.12.0), RcppEigen (>=, BH (>= 1.72.0-2), StanHeaders (>= 2.21.0), RcppParallel
VignetteBuilder knitr
SystemRequirements GNU make, pandoc
RoxygenNote 5.0.1
Packaged 2020-07-27 04:00:55 UTC; ben
Repository CRAN
Date/Publication 2020-07-27 09:50:02 UTC

Include our badge in your README