1. User-friendly Bayesian regression modeling: A tutorial with rstanarm and shinystan
- Author
-
Muth, Chelsea, Oravecz, Zita, and Gabry, Jonah
- Subjects
Bayesian modeling ,regression ,hierarchical linear model ,Stan, R, rstanarm ,Psychology ,BF1-990 - Abstract
This tutorial provides a pragmatic introduction to specifying, estimating and interpreting single-level and hierarchical linear regression models in the Bayesian framework. We start by summarizing why one should consider the Bayesian approach to the most common forms of regression. Next we introduce the R package rstanarm for Bayesian applied regression modeling. An overview of rstanarm fundamentals accompanies step-by-step guidance for fitting a single-level regression model with the stan_glm function, and fitting hierarchical regression models with the stan_lmer function, illustrated with data from an experience sampling study on changes in affective states. Exploration of the results is facilitated by the intuitive and user-friendly shinystan package. Data and scripts are available on the Open Science Framework page of the project. For readers unfamiliar with R, this tutorial is self-contained to enable all researchers who apply regression techniques to try these methods with their own data. Regression modeling with the functions in the rstanarm package will be a straightforward transition for researchers familiar with their frequentist counterparts, lm (or glm) and lmer.
- Published
- 2018
- Full Text
- View/download PDF