stanlogo.pngoptions: width="50px" alt="mc-stan.org" Stan Development Team
An appendage to the rstan package that enables some of the most common
applied regression models to be estimated using Markov Chain Monte Carlo,
variational approximations to the posterior distribution, or optimization.
The rstanarm package allows these models to be specified using the
customary R modeling syntax (e.g., like that of glm
with
a formula
and a data.frame
).
The set of models supported by rstanarm is large (and will continue to
grow), but also limited enough so that it is possible to integrate them
tightly with the pp_check
function for graphical posterior
predictive checks and the posterior_predict
function to easily
estimate the effect of specific manipulations of predictor variables or to
predict the outcome in a training set.
The objects returned by the rstanarm modeling functions are called
stanreg
objects. In addition to all of the
typical methods
defined for fitted model
objects, stanreg objects can be passed to the loo
function
in the loo package for model comparison or to the
launch_shinystan
function in the shinystan
package in order to visualize the posterior distribution using the ShinyStan
graphical user interface. See the rstanarm vignettes for more details
about the entire process.
algorithm
argument that can be one of the following:
priors
for an overview of the various choices the user can
make for prior distributions. The package vignettes also provide
examples of using many of the available priors as well as more detailed
descriptions of some of the novel priors used by rstanarm.Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., and Rubin, D. B. (2013). Bayesian Data Analysis. Chapman & Hall/CRC Press, London, third edition. http://stat.columbia.edu/~gelman/book/
Gelman, A. and Hill, J. (2007). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge University Press, Cambridge, UK. http://stat.columbia.edu/~gelman/arm/
Stan Development Team. (2016). Stan Modeling Language Users Guide and Reference Manual. http://mc-stan.org/documentation/
Vehtari, A., Gelman, A., and Gabry, J. (2016a). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing. Advance online publication. doi:10.1007/s11222-016-9696-4. arXiv preprint: http://arxiv.org/abs/1507.04544/
stanreg-objects
and stanreg-methods
for
details on the fitted model objects returned by the modeling functions.
The custom plot
and pp_check
methods for the various plots that can be used to explore and check fitted
models.
http://mc-stan.org/ for more information on the Stan C++ package used
by rstanarm for model fitting.
https://github.com/stan-dev/rstanarm/issues/ to submit a bug
report or feature request.
https://groups.google.com/forum/#!forum/stan-users/ to ask a question
about rstanarm on the Stan-users forum.