top banner top banner

Search publications

User-friendly Bayesian regression modeling: A tutorial with rstanarm and shinystan

Full text PDF
Bibliographic information: BibTEX format RIS format XML format APA style
Cited references information: BibTEX format APA style
Doi: 10.20982/tqmp.14.2.p099

Muth, Chelsea , Oravecz, Zita , Gabry, Jonah
Keywords: Bayesian modeling , regression , hierarchical linear model
Tools: Stan, R, rstanarm
(no sample data)   (no appendix)

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.

Pages © TQMP;
Template last modified: 2018-09-04.
Page consulted on .
Be informed of the upcoming issues with RSS feed: RSS icon RSS