Pre-workshop set-up
Please, follow these instructions carefully to get ready at least one day before the workshop.
Pre-requisites
Before installing the necessary software, make sure you have installed or updated the following software.
The latest version of R (https://cloud.r-project.org).
The latest version of RStudio (https://www.rstudio.com/products/rstudio/download/#download).
Your operating system is up-to-date.
Installation
Now you will need to install a few packages and extra software.
Here is an overview of what you will install:
C++ toolchain.
R packages: tidyverse, brms, tidybayes, extraDistr.
1. Install the C++ toolchain
The package brms used in the workshop requires a working C++ toolchain to compile models.
Windows
For Windows, follow the instructions here: https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html
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.
Linux
For Linux, follow the instructions here: https://github.com/stan-dev/rstan/wiki/Configuring-C-Toolchain-for-Linux
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.
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!
Troubleshooting
If you are having issues with installation, the best place to ask for help are:
The Stan Forums: https://discourse.mc-stan.org
StackOverflow: https://stackoverflow.com
Any search engine.
Download the materials
All the materials of the workshop (data, code, slides) are in the workshop repository on GitHub.
You have two options:
You can fork the repository and clone it locally if you use git/GitHub.
You can simply download the repo by clicking on the
Code
button >Download ZIP
on GitHub.