In this video, we're running a basic regression model in R (or Rstudio) step by step. We begin by opening R or Rstudio, making sure the working directory is set correctly. You can download the datafile from OSF here: https://osf.io/jgd4b. If you want to follow along the code, you can also download it from OSF: https://osf.io/c3jvm. I created these data purely for illustrative reasons. The code used in the video starts on line 11.
Once everything is in place, we look at three ways to run a regression model. Frequentists will use the built-in lm() command, while rstanarm and MCMCpack offer very easy Bayesian options. For the Bayesian approaches, we need to install packages, and not forget the library() command. Three ways to run your regression models in R, step by step.