Appendix A — Installing the brms package

In the Bayesian statistics component of the course, you will use the brms to fit Bayesian regression models. Behind the scenes, this package uses a programming language called Stan which requires a C++ compiler. Unlike other packages, you cannot just use the install.packages() function to install everything, there are a few steps to follow.

The best place to start is referring to the FAQs on the package Github page.

First, if you have a Windows computer, you should install Rtools. If you have a Mac, then you should install Xcode.

Once you have the program relevant to your computer, then you can install brms as usual:

install.packages("brms")