Package: rstan 2.35.0.9000

Ben Goodrich

rstan: 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.

Authors:Jiqiang Guo [aut], Jonah Gabry [aut], Ben Goodrich [cre, aut], Andrew Johnson [aut], Sebastian Weber [aut], Hamada S. Badr [aut], Daniel Lee [ctb], Krzysztof Sakrejda [ctb], Modrak Martin [ctb], Trustees of Columbia University [cph], Oleg Sklyar [cph], The R Core Team [cph], Jens Oehlschlaegel-Akiyoshi [cph], John Maddock [cph], Paul Bristow [cph], Nikhar Agrawal [cph], Christopher Kormanyos [cph], Bronder Steve [ctb]

rstan_2.35.0.9000.tar.gz
rstan_2.35.0.9000.zip(r-4.5)rstan_2.35.0.9000.zip(r-4.4)rstan_2.35.0.9000.zip(r-4.3)
rstan_2.35.0.9000.tgz(r-4.4-x86_64)rstan_2.35.0.9000.tgz(r-4.4-arm64)rstan_2.35.0.9000.tgz(r-4.3-x86_64)rstan_2.35.0.9000.tgz(r-4.3-arm64)
rstan_2.35.0.9000.tar.gz(r-4.5-noble)rstan_2.35.0.9000.tar.gz(r-4.4-noble)
rstan.pdf |rstan.html
rstan/json (API)
NEWS

# Install 'rstan' in R:
install.packages('rstan', repos = c('https://stan-dev.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/stan-dev/rstan/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

bayesian-data-analysisbayesian-inferencebayesian-statisticsmcmcstan

19.39 score 1.0k stars 256 packages 14k scripts 60k downloads 133 mentions 83 exports 51 dependencies

Last updated 3 hours agofrom:7dd184d422 (on experimental). Checks:OK: 3 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 22 2024
R-4.5-win-x86_64OKNov 22 2024
R-4.5-linux-x86_64OKNov 22 2024
R-4.4-win-x86_64NOTENov 22 2024
R-4.4-mac-x86_64NOTENov 22 2024
R-4.4-mac-aarch64NOTENov 22 2024
R-4.3-win-x86_64NOTENov 22 2024
R-4.3-mac-x86_64NOTENov 22 2024
R-4.3-mac-aarch64NOTENov 22 2024

Exports:As.mcmc.listcheck_divergencescheck_energycheck_hmc_diagnosticscheck_treedepthconstrain_parscpp_object_initializeress_bulkess_tailexpose_stan_functionsextractextract_sparse_partsget_adaptation_infoget_bfmiget_cppcodeget_cppo_modeget_cxxflagsget_divergent_iterationsget_elapsed_timeget_initsget_logposteriorget_low_bfmi_chainsget_max_treedepth_iterationsget_num_divergentget_num_leapfrog_per_iterationget_num_max_treedepthget_num_uparsget_posterior_meanget_rngget_sampler_paramsget_seedget_seedsget_stancodeget_stanmodelget_streamgqsgrad_log_problog_problooloo_moment_matchlookupmakeconf_pathmonitornlistoptimizingOUTplotquietggread_rdumpread_stan_csvRhatRNGrstan_gg_optionsrstan_ggtheme_optionsrstan_optionsrstan.package.skeletonsamplingsbcset_cpposflist2stanfitshowstanstan_acstan_demostan_densstan_diagstan_essstan_histstan_mcsestan_modelstan_parstan_plotstan_rdumpstan_rhatstan_scatstan_tracestan_versionstancstanc_buildersummarytraceplotunconstrain_parsvb

Dependencies:abindbackportsBHcallrcheckmateclicolorspacedescdistributionalfansifarvergenericsggplot2gluegridExtragtableinlineisobandlabelinglatticelifecycleloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivpillarpkgbuildpkgconfigposteriorprocessxpsQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangscalesStanHeaderstensorAtibbleutf8vctrsviridisLitewithr

Interfacing with External C++ Code

Rendered fromexternal.Rmdusingknitr::rmarkdownon Nov 22 2024.

Last update: 2023-08-31
Started: 2016-12-13

RStan: the R interface to Stan

Rendered fromrstan.Rmdusingknitr::rmarkdownon Nov 22 2024.

Last update: 2023-08-31
Started: 2016-06-04

Simulation Based Calibration

Rendered fromSBC.Rmdusingknitr::rmarkdownon Nov 22 2024.

Last update: 2020-06-26
Started: 2019-04-18

Accessing the contents of a stanfit object

Rendered fromstanfit-objects.Rmdusingknitr::rmarkdownon Nov 22 2024.

Last update: 2020-06-26
Started: 2016-06-04

Readme and manuals

Help Manual

Help pageTopics
RStan - the R interface to Stanrstan-package rstan
Create array, matrix, or data.frame objects from samples in a 'stanfit' objectas.array.stanfit as.data.frame.stanfit as.matrix.stanfit dim.stanfit dimnames.stanfit is.array.stanfit names.stanfit names<-.stanfit
Create an mcmc.list from a stanfit objectAs.mcmc.list
Check HMC diagnostics after samplingcheck_divergences check_energy check_hmc_diagnostics check_treedepth get_bfmi get_divergent_iterations get_low_bfmi_chains get_max_treedepth_iterations get_num_divergent get_num_leapfrog_per_iteration get_num_max_treedepth
RStan Diagnostic plotsstan_diag stan_ess stan_mcse stan_par stan_rhat
Expose user-defined Stan functions to R for testing and simulationexpose_stan_functions get_rng get_stream
Extract samples from a fitted Stan modelextract extract,stanfit-method
Extract the compressed representation of a sparse matrixextract_sparse_parts
Draw samples of generated quantities from a Stan modelgqs gqs,stanmodel-method
'log_prob' and 'grad_log_prob' functionsconstrain_pars constrain_pars,stanfit-method get_num_upars get_num_upars,stanfit-method grad_log_prob grad_log_prob,stanfit-method log_prob log_prob,stanfit-method unconstrain_pars unconstrain_pars,stanfit-method
Moment matching for efficient approximate leave-one-out cross-validation (LOO)loo_moment_match loo_moment_match,stanfit-method loo_moment_match.stanfit
Approximate leave-one-out cross-validationloo loo,stanfit-method loo.stanfit
Look up the Stan function that corresponds to a R function or name.lookup
Obtain the full path of file 'Makeconf'makeconf_path
Compute summaries of MCMC draws and monitor convergencemonitor print.simsummary [.simsummary
Created named listsnlist
Obtain a point estimate by maximizing the joint posterioroptimizing optimizing,stanmodel-method
Create a matrix of output plots from a 'stanfit' objectpairs.stanfit
Plots for stanfit objectsplot,stanfit,missing-method plot,stanfit-method
ggplot2 for RStanquietgg stan_ac stan_dens stan_hist stan_plot stan_scat stan_trace
Print a summary for a fitted model represented by a 'stanfit' objectprint.stanfit
Read data in an R dump file to a listread_rdump
Read CSV files of samples generated by (R)Stan into a 'stanfit' objectread_stan_csv
Convergence and efficiency diagnostics for Markov Chainsess_bulk ess_tail Rhat
Set default appearance optionsrstan_ggtheme_options rstan_gg_options
Set and read options used in RStanrstan_options
RStan Plotting Functionsrstan-plotting-functions
Create a Skeleton for a New Source Package with Stan Programsrstan.package.skeleton
Draw samples from a Stan modelsampling sampling,stanmodel-method
Simulation Based Calibration (sbc)plot.sbc print.sbc sbc
Defunct function to set the compiler optimization levelset_cppo
Merge a list of stanfit objects into onesflist2stanfit
Fit a model with Stanstan
Demonstrate examples included in Stanstan_demo
Construct a Stan modelstan_model
Dump the data for a Stan model to R dump file in the limited format that Stan can read.stan_rdump
Obtain the version of Stanstan_version
Translate Stan model specification to C++ codestanc stanc_builder
Class 'stanfit': fitted Stan modelget_adaptation_info get_adaptation_info,stanfit-method get_cppo_mode get_cppo_mode,stanfit-method get_elapsed_time get_elapsed_time,stanfit-method get_inits get_inits,stanfit-method get_logposterior get_logposterior,stanfit-method get_posterior_mean get_posterior_mean,stanfit-method get_sampler_params get_sampler_params,stanfit,logical-method get_seed get_seed,stanfit-method get_seeds get_seeds,stanfit-method get_stancode get_stancode,stanfit-method get_stanmodel get_stanmodel,stanfit-method show,stanfit-method stanfit stanfit-class
Class representing model compiled from C++get_cppcode get_cppcode,stanmodel-method get_cxxflags get_cxxflags,stanmodel-method get_stancode,stanmodel-method show,stanmodel-method stanmodel-class
Summary method for stanfit objectssummary,stanfit-method
Markov chain traceplotstraceplot traceplot,stanfit-method
Run Stan's variational algorithm for approximate posterior samplingvb vb,stanmodel-method