rstanarm (version 2.14.1)

rstanarm-package: Applied Regression Modeling via RStan

Description

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.

Arguments

Estimation algorithms

The modeling functions in the rstanarm package take an algorithm argument that can be one of the following:

Modeling functions

The model estimating functions are described in greater detail in their individual help pages and vignettes. Here we provide a very brief overview:

Prior distributions

See priors help page 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.

References

Bates, D., Maechler, M., Bolker, B., and Walker, S. (2015). Fitting linear mixed-Effects models using lme4. Journal of Statistical Software. 67(1), 1--48.

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/

See Also