Preparing for the tutorial

You will need to be able to compile and run Stan models from R/Rstudio via either rstan or cmdstanr. If you are not already an R user, we recommend using RStudio + cmdstanr. A good guide to install RStudio is at and installing cmdstanr is described at If you encounter any problems during installation, please ask for help at

To let you work quickly through the exercises, we recommend running our setup script that makes sure you have installed all you need and precompiles all models used in the exercises. Create an empty directory for the tutorial files and run


If you don’t want to use the setup script you’ll need to at least install the new SBC package. To install it, you’ll need the remotes package first:


Then you can install SBC via


Slides for the tutorial

Getting help during the live tutorial

If you are having technical problems running Stan models, visit on of the “Resolving Stan problems” tables in the social lounge.

Problems with tutorial tasks/questions should first be consulted with your colleagues at your table. If that doesn’t work for you for any reason, send a private message to one of the organizers (Martin Modrák, Hyunji Moon, Shinyoung Kim) - you need to click “People” in the right sidebar, find any of us and click “Send message”

Discuss your results

If you want to discuss the results after the tutorial (e.g. wonder if you got the bonus questions right), feel welcome to ask at a dedicated thread on Stan forums.

Poster on SBC & algorithms

Phil Clemson made a neat poster on using SBC for testing algorithms once we have a simulator and model we trust (unlike the tutorial which focuses on testing a model when we have an algorithm and a simulator we trust).