# R Interface to Stan

## Documentation for package ‘rstan’ version 2.21.8

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A C D E G I L M N O P Q R S T U V misc

rstan-package | RStan - the R interface to Stan

## -- A --

as.array.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object
as.data.frame.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object
as.matrix.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object
As.mcmc.list | Create an mcmc.list from a stanfit object

## -- C --

check_divergences | Check HMC diagnostics after sampling
check_energy | Check HMC diagnostics after sampling
check_hmc_diagnostics | Check HMC diagnostics after sampling
check_treedepth | Check HMC diagnostics after sampling
constrain_pars | 'log_prob' and 'grad_log_prob' functions
constrain_pars-method | 'log_prob' and 'grad_log_prob' functions

## -- D --

dim.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object
dimnames.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object

## -- E --

ess_bulk | Convergence and efficiency diagnostics for Markov Chains
ess_tail | Convergence and efficiency diagnostics for Markov Chains
expose_stan_functions | Expose user-defined Stan functions to R for testing and simulation
extract | Extract samples from a fitted Stan model
extract-method | Extract samples from a fitted Stan model
extract_sparse_parts | Extract the compressed representation of a sparse matrix

## -- G --

get_adaptation_info | Class 'stanfit': fitted Stan model
get_adaptation_info-method | Class 'stanfit': fitted Stan model
get_bfmi | Check HMC diagnostics after sampling
get_cppcode | Class representing model compiled from C++
get_cppcode-method | Class representing model compiled from C++
get_cppo_mode | Class 'stanfit': fitted Stan model
get_cppo_mode-method | Class 'stanfit': fitted Stan model
get_cxxflags | Class representing model compiled from C++
get_cxxflags-method | Class representing model compiled from C++
get_divergent_iterations | Check HMC diagnostics after sampling
get_elapsed_time | Class 'stanfit': fitted Stan model
get_elapsed_time-method | Class 'stanfit': fitted Stan model
get_inits | Class 'stanfit': fitted Stan model
get_inits-method | Class 'stanfit': fitted Stan model
get_logposterior | Class 'stanfit': fitted Stan model
get_logposterior-method | Class 'stanfit': fitted Stan model
get_low_bfmi_chains | Check HMC diagnostics after sampling
get_max_treedepth_iterations | Check HMC diagnostics after sampling
get_num_divergent | Check HMC diagnostics after sampling
get_num_leapfrog_per_iteration | Check HMC diagnostics after sampling
get_num_max_treedepth | Check HMC diagnostics after sampling
get_num_upars | 'log_prob' and 'grad_log_prob' functions
get_num_upars-method | 'log_prob' and 'grad_log_prob' functions
get_posterior_mean | Class 'stanfit': fitted Stan model
get_posterior_mean-method | Class 'stanfit': fitted Stan model
get_rng | Expose user-defined Stan functions to R for testing and simulation
get_sampler_params | Class 'stanfit': fitted Stan model
get_sampler_params-method | Class 'stanfit': fitted Stan model
get_seed | Class 'stanfit': fitted Stan model
get_seed-method | Class 'stanfit': fitted Stan model
get_seeds | Class 'stanfit': fitted Stan model
get_seeds-method | Class 'stanfit': fitted Stan model
get_stancode | Class 'stanfit': fitted Stan model
get_stancode-method | Class 'stanfit': fitted Stan model
get_stancode-method | Class representing model compiled from C++
get_stanmodel | Class 'stanfit': fitted Stan model
get_stanmodel-method | Class 'stanfit': fitted Stan model
get_stream | Expose user-defined Stan functions to R for testing and simulation
gqs | Draw samples of generated quantities from a Stan model
gqs-method | Draw samples of generated quantities from a Stan model
grad_log_prob | 'log_prob' and 'grad_log_prob' functions
grad_log_prob-method | 'log_prob' and 'grad_log_prob' functions

## -- I --

is.array.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object

## -- L --

log_prob | 'log_prob' and 'grad_log_prob' functions
log_prob-method | 'log_prob' and 'grad_log_prob' functions
loo | Approximate leave-one-out cross-validation
loo-method | Approximate leave-one-out cross-validation
loo.stanfit | Approximate leave-one-out cross-validation
lookup | Look up the Stan function that corresponds to a R function or name.
loo_moment_match | Moment matching for efficient approximate leave-one-out cross-validation (LOO)
loo_moment_match-method | Moment matching for efficient approximate leave-one-out cross-validation (LOO)
loo_moment_match.stanfit | Moment matching for efficient approximate leave-one-out cross-validation (LOO)

## -- M --

makeconf_path | Obtain the full path of file 'Makeconf'
monitor | Compute summaries of MCMC draws and monitor convergence

## -- N --

names.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object
names<-.stanfit | Create array, matrix, or data.frame objects from samples in a 'stanfit' object
nlist | Created named lists

## -- O --

optimizing | Obtain a point estimate by maximizing the joint posterior
optimizing-method | Obtain a point estimate by maximizing the joint posterior

## -- P --

pairs.stanfit | Create a matrix of output plots from a 'stanfit' object
plot-method | Plots for stanfit objects
plot.sbc | Simulation Based Calibration (sbc)
print.sbc | Simulation Based Calibration (sbc)
print.simsummary | Compute summaries of MCMC draws and monitor convergence
print.stanfit | Print a summary for a fitted model represented by a 'stanfit' object

## -- Q --

quietgg | ggplot2 for RStan

## -- R --

read_rdump | Read data in an R dump file to a list
read_stan_csv | Read CSV files of samples generated by (R)Stan into a 'stanfit' object
Rhat | Convergence and efficiency diagnostics for Markov Chains
rstan | RStan - the R interface to Stan
rstan-plotting-functions | RStan Plotting Functions
rstan.package.skeleton | Create a Skeleton for a New Source Package with Stan Programs
rstan_ggtheme_options | Set default appearance options
rstan_gg_options | Set default appearance options
rstan_options | Set and read options used in RStan

## -- S --

sampling | Draw samples from a Stan model
sampling-method | Draw samples from a Stan model
sbc | Simulation Based Calibration (sbc)
set_cppo | Defunct function to set the compiler optimization level
sflist2stanfit | Merge a list of stanfit objects into one
show-method | Class 'stanfit': fitted Stan model
show-method | Class representing model compiled from C++
stan | Fit a model with Stan
stanc | Translate Stan model specification to C++ code
stanc_builder | Translate Stan model specification to C++ code
stanfit | Class 'stanfit': fitted Stan model
stanfit-class | Class 'stanfit': fitted Stan model
stanmodel-class | Class representing model compiled from C++
stan_ac | ggplot2 for RStan
stan_demo | Demonstrate examples included in Stan
stan_dens | ggplot2 for RStan
stan_diag | RStan Diagnostic plots
stan_ess | RStan Diagnostic plots
stan_hist | ggplot2 for RStan
stan_mcse | RStan Diagnostic plots
stan_model | Construct a Stan model
stan_par | RStan Diagnostic plots
stan_plot | ggplot2 for RStan
stan_rdump | Dump the data for a Stan model to R dump file in the limited format that Stan can read.
stan_rhat | RStan Diagnostic plots
stan_scat | ggplot2 for RStan
stan_trace | ggplot2 for RStan
stan_version | Obtain the version of Stan
summary-method | Summary method for stanfit objects

## -- T --

traceplot | Markov chain traceplots
traceplot-method | Markov chain traceplots

## -- U --

unconstrain_pars | 'log_prob' and 'grad_log_prob' functions
unconstrain_pars-method | 'log_prob' and 'grad_log_prob' functions

## -- V --

vb | Run Stan's variational algorithm for approximate posterior sampling
vb-method | Run Stan's variational algorithm for approximate posterior sampling

## -- misc --

[.simsummary | Compute summaries of MCMC draws and monitor convergence