Pre-workshop set-up

Please, follow these instructions carefully to get ready at least one day before the workshop.

Important

Installing the necessary software takes a lot of space on your computer and can take a long of time (1-3 hours depending on the system).

1 Pre-requisites

Before installing the necessary software, make sure you have installed or updated the following software.

2 Installation

Important

If you have previously installed the C++ toolkit or if you have recently updated your OS, please follow these instructions to reinstall them.

Now you will need to install a few packages and extra software.

Here is an overview of what you will install:

  1. C++ toolchain.

  2. R packages: tidyverse, brms, tidybayes, extraDistr.

2.1 1. Install the C++ toolchain

The package brms used in the workshop requires a working C++ toolchain to compile models.

2.1.1 Windows

For Windows, follow the instructions here: https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html

2.1.2 macOS

For macOS, open the Terminal and write the following line then press enter/return:

xcode-select --install

You’ll see a panel that asks you to install the Xcode Command Line Tools. Install them. Downloading and installation will take 30 to 60 minutes.

2.1.3 Linux

For Linux, follow the instructions here: https://github.com/stan-dev/rstan/wiki/Configuring-C-Toolchain-for-Linux

2.2 2. Install the R packages

You need to install the following packages:

install.packages(c("tidyverse", "brms", "tidybayes", "extraDistr"))

It will take several minutes to install the packages, depending on your system and configuration.

If after opening the workshop project in RStudio you get asked to install extra packages or software, please do so.

2.3 Check your installation

Run the following in the RStudio Console:

example(stan_model, package = "rstan", run.dontrun = TRUE)

If you see some strange looking text printed in the Console and then fit and fit2 in the Environment, then you are sorted!

3 Troubleshooting

If you are having issues with installation, post a question on Piazza. Note that we won’t reply to questions sent via emails, unless they are related to personal matters.