rstan: R Interface to Stan
Version 2.15.1

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.

AuthorJiqiang Guo [aut], Jonah Gabry [aut], Ben Goodrich [cre, aut], Daniel Lee [ctb], Krzysztof Sakrejda [ctb], Trustees of Columbia University [cph], Oleg Sklyar [cph] (R/cxxfunplus.R), The R Core Team [cph] (R/pairs.R, R/dynGet.R), Jens Oehlschlaegel-Akiyoshi [cph] (R/pairs.R), Hadley Wickham [cph] (R/rtools.R), Joel de Guzman [cph] (Boost), John Fletcher [cph] (Boost), Thomas Heller [cph] (Boost), Eric Niebler [cph] (Boost)
Date of publication2017-04-19 09:15:39 UTC
MaintainerBen Goodrich <benjamin.goodrich@columbia.edu>
LicenseGPL (>= 3)
Version2.15.1
URL https://groups.google.com/forum/#!forum/stan-users http://mc-stan.org
Package repositoryView on CRAN
InstallationInstall the latest version of this package by entering the following in R:
install.packages("rstan")

Getting started

Accessing the contents of a stanfit object
Interfacing with External C++ Code
RStan: the R interface to Stan

Popular man pages

expose_stan_functions: Expose user-defined Stan functions to R for testing and...
stan: Fit a model using Stan
stanfit-method-extract: Extract samples from a fitted Stan model
stanfit-method-plot: Plots for stanfit objects
stanfit-method-traceplot: Markov chain traceplots
stan_model: Construct a Stan model
stanmodel-method-vb: Run Stan's variational algorithm for approximate posterior...
See all...

All man pages Function index File listing

Man pages

As.mcmc.list: Create an mcmc.list from a stanfit object
expose_stan_functions: Expose user-defined Stan functions to R for testing and...
extract_sparse_parts: Extract the compressed representation of a sparse matrix
lookup: Look up the Stan function that corresponds to a R function or...
makeconf_path: Obtain the full path of file 'Makeconf'
monitor: Compute summaries of MCMC draws and monitor convergence
plotting-functions: RStan Plotting Functions
print.stanfit: Print a summary for a fitted model represented by a 'stanfit'...
read_rdump: Read data in an R dump file to a list
rstan: RStan - R interface to Stan
rstan-internal: Internal Functions and Methods
rstan_options: Set and read options used in RStan
rstan.package.skeleton: Create a Skeleton for a New Source Package with Stan Programs
set_cppo: Defunct function to set the compiler optimization level
sflist2stanfit: Merge a list of stanfit objects into one
stan: Fit a model using Stan
stanc: Translate Stan model specification to C++ code
stan_csv: Read CSV files of samples generated by (R)Stan into a...
stan_demo: Demonstrate examples included in Stan
stanfit2array-method: Create array, matrix, or data.frame objects from samples in a...
stanfit-class: Class 'stanfit': fitted Stan model
stanfit-method-extract: Extract samples from a fitted Stan model
stanfit-method-logprob: Model's 'log_prob' and 'grad_log_prob' functions
stanfit-method-pairs: Create a matrix of output plots from a 'stanfit' object
stanfit-method-plot: Plots for stanfit objects
stanfit-method-summary: Summary method for stanfit objects
stanfit-method-traceplot: Markov chain traceplots
stan_model: Construct a Stan model
stanmodel-class: Class representing model compiled from C++
stanmodel-method-optimizing: Obtain a point estimate by maximizing the joint posterior
stanmodel-method-sampling: Draw samples from a Stan model
stanmodel-method-vb: Run Stan's variational algorithm for approximate posterior...
stan_plot: ggplot2 for RStan
stan_plot_diagnostics: RStan Diagnostic plots
stan_plot_options: Set default appearance options
stan_rdump: Dump the data for a Stan model to R dump file in the limited...
stan_version: Obtain the version of Stan

Functions

As.mcmc.list Man page Source code
PKG_CPPFLAGS_env_fun Source code
ac_fun Source code
ac_plot_data Source code
ac_plot_data_multi Source code
add_aesthetics Source code
all_int_eq Source code
append_id Source code
as.array.stanfit Man page Source code
as.data.frame.stanfit Man page Source code
as.matrix.stanfit Man page Source code
as.mcmc.list.stanfit Source code
avoid_crash Source code
boost_path_fun Source code
boost_path_fun2 Source code
boost_url Source code
calc_starts Source code
check_args Source code
check_object Source code
check_pars Source code
check_pars_first Source code
check_pars_second Source code
check_seed Source code
color_vector Source code
color_vector_chain Source code
combine_msd_quan Source code
config_argss Source code
constrain_pars Man page
constrain_pars,ANY-method Man page
constrain_pars,stanfit-method Man page
cpp_object_initializer Man page
create_progress_html_file Source code
create_skeleton Source code
cxxdso-class Man page
cxxfun_from_dll Source code
cxxfun_from_dso_bin Source code
cxxfunctionplus Source code
data_list2array Source code
data_preprocess Source code
default_summary_probs Source code
delete_stan_demo_folder Source code
dim.stanfit Man page Source code
dimnames.stanfit Man page Source code
dotfnames_to_sqrfnames Source code
dso_path Source code
dynGet Source code
eigen_path_fun Source code
ess_rfun Source code
expose_stan_functions Man page Source code
extract Man page
extract,stanfit-method Man page
extract_sparse_parts Man page Source code
filename_ext Source code
filename_rm_ext Source code
find_rtools Source code
flat_one_par Source code
flatnames Source code
get_CXX Source code
get_Rcpp_module_def_code Source code
get_adaptation_info Man page
get_adaptation_info,ANY-method Man page
get_adaptation_info,stanfit-method Man page
get_cppcode Man page
get_cppcode,ANY-method Man page
get_cppcode,stanmodel-method Man page
get_cppo_mode Man page
get_cppo_mode,stanfit-method Man page
get_cxxflags Man page
get_cxxflags,stanmodel-method Man page
get_cxxo_level Source code
get_dims_from_fnames Source code
get_elapsed_time Man page
get_elapsed_time,ANY-method Man page
get_elapsed_time,stanfit-method Man page
get_inits Man page
get_inits,stanfit-method Man page
get_kept_samples Source code
get_kept_samples2 Source code
get_logposterior Man page
get_logposterior,ANY-method Man page
get_logposterior,stanfit-method Man page
get_makefile_flags Source code
get_makefile_txt Source code
get_model_strcode Source code
get_num_upars Man page
get_num_upars,ANY-method Man page
get_num_upars,stanfit-method Man page
get_par_summary Source code
get_par_summary_msd Source code
get_par_summary_quantile Source code
get_posterior_mean Man page
get_posterior_mean,ANY-method Man page
get_posterior_mean,stanfit-method Man page
get_rhat_cols Source code
get_sampler_params Man page
get_sampler_params,ANY-method Man page
get_sampler_params,stanfit,logical-method Man page
get_samples Source code
get_samples2 Source code
get_seed Man page
get_seed,stanfit-method Man page
get_seeds Man page
get_seeds,stanfit-method Man page
get_stan_param_names Source code
get_stan_params Source code
get_stancode Man page
get_stancode,stanfit-method Man page
get_stanmodel Man page
get_stanmodel,stanfit-method Man page
get_stanreg_parnames Source code
get_time_from_csv Source code
git_head Source code Source code Source code Source code Source code Source code Source code Source code Source code Source code Source code Source code Source code Source code
grab_cxxfun,cxxdso-method Man page
grad_log_prob Man page
grad_log_prob,ANY-method Man page
grad_log_prob,stanfit-method Man page
idx_col2rowm Source code
idx_row2colm Source code
if_debug_defined Source code
if_ndebug_defined Source code
inc_path_fun Source code
init_rstan_opt_env Source code
inlineCxxPlugin Source code
is.array.stanfit Man page Source code
is.sparc Source code
is.stanfit Source code
is.stanreg Source code
is_arg_deprecated Source code
is_arg_recognizable Source code
is_dir_writable Source code
is_dso_loaded,cxxdso-method Man page
is_legal_stan_vname Source code
is_named_list Source code
is_null_cxxfun Source code
is_null_ptr Source code
is_sf_valid Source code
is_sfinstance_valid Source code
is_sm_valid Source code
last_makefile Source code
legitimate_model_name Source code
legitimate_space_in_path Source code
list_as_integer_if_doable Source code
log_prob Man page
log_prob,ANY-method Man page
log_prob,stanfit-method Man page
lookup Man page Source code
make_plot_data Source code
makeconf_path Man page Source code
max_td Source code
mk_cppmodule Source code
mklist Source code
mode_check Source code
monitor Man page Source code
multi_idx_row2colm Source code
names.stanfit Man page Source code
names<-.stanfit Man page
new_empty_stanfit Source code
num_pars Source code
nuts_args_check Source code
nuts_return Source code
obj_size_str Source code
onAttach Source code
onLoad Source code
optimizing Man page
optimizing,stanmodel-method Man page
p_hist Source code
pairs.stanfit Man page Source code
par_traceplot Source code
paridx_fun Source code
pars_total_indexes Source code
parse_data Source code
parse_stancsv_comments Source code
plot,stanfit,missing-method Man page
plot,stanfit-method Man page
plot_rhat_legend Source code
prep_call_sampler Source code
print.stanfit Man page Source code
quietgg Man page Source code
read_comments Source code
read_comments_old Source code
read_csv_header Source code
read_dso Source code
read_model_from_con Source code
read_one_stan_csv Source code
read_rdump Man page Source code
read_stan_csv Man page Source code
real_is_integer Source code
remove_empty_pars Source code
remove_udiag_pars Source code
reshape_df Source code
reshape_sample Source code
rhat_neff_mcse_hist Source code
rm_last_makefile Source code
rm_rstan_makefile_flags Source code
rstan Man page
rstan-internal Man page
rstan-package Man page
rstan-plotting-functions Man page
rstan.package.skeleton Man page Source code
rstan_ess Source code
rstan_ess2_cpp Source code
rstan_gg_options Man page Source code
rstan_ggtheme_options Man page Source code
rstan_options Man page Source code
rstan_relist Source code
rstan_seq_perm Source code
rstan_splitrhat Source code
rstan_splitrhat2_cpp Source code
rstanplugin Source code
rstudio_stanc Source code
sampler_param_df Source code
sampler_param_vs_param Source code
sampler_param_vs_sampler_param_violin Source code
sampler_params_post_warmup Source code
sampling Man page
sampling,stanmodel-method Man page Man page
seq_array_ind Source code
set_cppo Man page Source code
set_makefile_flags Source code
sflist2stanfit Man page Source code
show,cxxdso-method Man page
show,stanfit-method Man page
show,stanmodel-method Man page
split_rhat_rfun Source code
sqrfnames_to_dotfnames Source code
stan Man page Source code
stan_ac Man page Source code
stan_demo Man page Source code
stan_dens Man page Source code
stan_diag Man page Source code
stan_divergence Source code
stan_ess Man page Source code
stan_hist Man page Source code
stan_mcse Man page Source code
stan_model Man page Source code
stan_par Man page Source code
stan_plot Man page Source code
stan_plot_inferences Source code
stan_rdump Man page Source code
stan_rhat Man page Source code
stan_sample Source code
stan_scat Man page Source code
stan_stepsize Source code
stan_trace Man page Source code
stan_treedepth Source code
stan_version Man page Source code
stanc Man page Source code
stanc_builder Man page Source code
stanfit Man page
stanfit-class Man page
stanmodel-class Man page
summary,stanfit-method Man page
summary_sim Source code
summary_sim_ess Source code
summary_sim_quan Source code
summary_sim_rhat Source code
system_info Source code
throw_sampler_warnings Source code
traceplot Man page
traceplot,stanfit-method Man page
treedepth_ndivergent_hist Source code
trimws Source code
unconstrain_pars Man page
unconstrain_pars,ANY-method Man page
unconstrain_pars,stanfit-method Man page
unique_par Source code
upars Source code
vb Man page
vb,stanmodel-method Man page
vb_check Source code
writable_sample_file Source code

Files

inst
inst/CITATION
inst/misc
inst/misc/rstan_doc_ex_incomplete_2.csv
inst/misc/rstan_doc_ex_3.csv
inst/misc/rstan_doc_ex_incomplete_1.csv
inst/misc/rstan_doc_ex_1.csv
inst/misc/rstan_doc_ex_4.csv
inst/misc/stan_progress.html
inst/misc/rstan_doc_ex_2.csv
inst/NEWS
inst/doc
inst/doc/stanfit-objects.Rmd
inst/doc/external.Rmd
inst/doc/stanfit-objects.html
inst/doc/rstan.Rmd
inst/doc/stanfit-objects.R
inst/doc/external.html
inst/doc/external.R
inst/doc/rstan.html
inst/doc/rstan.R
inst/unitTests
inst/unitTests/test_rlist_ref_var_context.cpp
inst/unitTests/test_rlist_ref_var_context.R
inst/unitTests/test_r_ostream.R
inst/unitTests/runit.test.options.R
inst/unitTests/runit.test.stan_csv.R
inst/unitTests/runit.test.extract_sparse_parts.R
inst/unitTests/runit.test.chains.R
inst/unitTests/testdata
inst/unitTests/testdata/blocker2.csv
inst/unitTests/testdata/blocker1.csv
inst/unitTests/runRunitTests.R
inst/unitTests/runit.test.misc.R
inst/include
inst/include/boost_not_in_BH
inst/include/boost_not_in_BH/boost
inst/include/boost_not_in_BH/boost/math
inst/include/boost_not_in_BH/boost/math/policies
inst/include/boost_not_in_BH/boost/math/policies/error_handling.hpp
inst/include/boost_not_in_BH/boost/fusion
inst/include/boost_not_in_BH/boost/fusion/support
inst/include/boost_not_in_BH/boost/fusion/support/unused.hpp
inst/include/boost_not_in_BH/boost/exception
inst/include/boost_not_in_BH/boost/exception/exception.hpp
inst/include/boost_not_in_BH/boost/phoenix
inst/include/boost_not_in_BH/boost/phoenix/core
inst/include/boost_not_in_BH/boost/phoenix/core/actor.hpp
inst/include/rstan
inst/include/rstan/values.hpp
inst/include/rstan/stan_fit.hpp
inst/include/rstan/filtered_values.hpp
inst/include/rstan/sum_values.hpp
inst/include/rstan/io
inst/include/rstan/io/rlist_ref_var_context.hpp
inst/include/rstan/io/r_ostream.hpp
inst/include/rstan/rstaninc.hpp
inst/include/rstan/stan_args.hpp
inst/include/rstan/rstan_writer.hpp
inst/include/rstan/comment_writer.hpp
inst/include/rstan/rcpp_module_def_for_rstan.hpp
inst/include/rstan/value.hpp
tests
tests/doRUnit.R
src
src/lang__ast_def.cpp
src/Makevars
src/misc.cpp
src/stanc.cpp
src/lang__grammars__expression07_grammar_inst.cpp
src/lang__grammars__functions_grammar_inst.cpp
src/lang__grammars__statement_grammar_inst.cpp
src/lang__grammars__semantic_actions.cpp
src/lang__grammars__term_grammar_inst.cpp
src/lang__grammars__statement_2_grammar_inst.cpp
src/lang__grammars__bare_type_grammar_inst.cpp
src/lang__grammars__program_grammar_inst.cpp
src/lang__grammars__var_deccls_grammar_inst.cpp
src/lang__grammars__whitespace_grammar_inst.cpp
src/Makevars.win
src/init.cpp
src/lang__grammars__expression_grammar_inst.cpp
src/sparse_extractors.cpp
src/lang__grammars__indexes_grammar_inst.cpp
src/chains.cpp
NAMESPACE
R
R/monitor.R
R/rtools.R
R/plugin.R
R/stanmodel-class.R
R/stan_plot_options.R
R/AllClass.R
R/chains.R
R/stan_plot.R
R/sysdata.rda
R/expose_stan_functions.R
R/makefile_op.R
R/git_rstan_head.R
R/cxxfunplus.R
R/extract_sparse_parts.R
R/Rcpp_module_def.R
R/options.R
R/rstan_package_skeleton.R
R/cxxdso-class.R
R/lookup.R
R/stan_csv.R
R/stanfit-class.R
R/stan_plot_helpers.R
R/rstan.R
R/misc.R
R/stanc.R
R/zzz.R
R/dynGet.R
R/stan_demo.R
R/pairs.R
vignettes
vignettes/stanfit-objects.Rmd
vignettes/external.Rmd
vignettes/rstan.Rmd
vignettes/besselK.hpp
vignettes/rstan.bib
vignettes/fib.hpp
vignettes/schools.stan
MD5
build
build/vignette.rds
DESCRIPTION
man
man/stanfit-method-traceplot.Rd
man/rstan.package.skeleton.Rd
man/figures
man/figures/stanlogo.png
man/rstan-internal.Rd
man/stanfit-method-extract.Rd
man/stanfit-method-summary.Rd
man/stanfit-method-pairs.Rd
man/stanfit-method-plot.Rd
man/stan_csv.Rd
man/stan_rdump.Rd
man/As.mcmc.list.Rd
man/monitor.Rd
man/stan_plot_diagnostics.Rd
man/print.stanfit.Rd
man/read_rdump.Rd
man/rstan.Rd
man/stan.Rd
man/stanmodel-class.Rd
man/stanmodel-method-optimizing.Rd
man/stanfit-class.Rd
man/makeconf_path.Rd
man/stanmodel-method-vb.Rd
man/expose_stan_functions.Rd
man/lookup.Rd
man/stanmodel-method-sampling.Rd
man/stanc.Rd
man/set_cppo.Rd
man/stan_demo.Rd
man/stan_plot.Rd
man/rstan_options.Rd
man/stan_version.Rd
man/extract_sparse_parts.Rd
man/stan_plot_options.Rd
man/stanfit-method-logprob.Rd
man/stanfit2array-method.Rd
man/plotting-functions.Rd
man/stan_model.Rd
man/sflist2stanfit.Rd
tools
tools/stan-functions.txt
tools/stan-functions.R
rstan documentation built on May 19, 2017, 11:30 p.m.