This course gives a practical introduction to Bayesian modelling with JAGS. It covers the core ideas of Bayesian inference, the structure of BUGS/JAGS model code, and how to fit, diagnose, and interpret Bayesian models from R. The practical focus is on models that are especially relevant for evidence synthesis, including missing-data handling, meta-analysis, IPD meta-analysis, and network meta-analysis.

The course contents are held at a graduate and PhD student level. It is assumed that you have some previous experience with R programming, statistical modelling, and meta-analysis.


📑 What the course covers

  • Bayesian inference and basic notation
  • BUGS/JAGS syntax and model structure
  • A first regression model in JAGS
  • Model diagnostics for MCMC output
  • Missing data and multilevel multiple imputation
  • Aggregate-data and IPD meta-analysis
  • Network meta-analysis and more advanced extensions

✔️ How to prepare

Before the course, please prepare the following:

  • R: make sure that you have R installed and running on your computer. Version 4.5.0 or higher is recommended.
  • RStudio: during the course, RStudio will be used for the practicals. However, other IDEs such as VS Code or Positron can also be used.
  • JAGS: please make sure to install JAGS before the course starts. JAGS is not a package for R, but a separate program that can be downloaded here. Make sure to select the correct operating system (Windows, Mac, or Linux), and follow the installation instructions.
  • {rjags}: to run JAGS models from R, the rjags package is required. After installing both JAGS and rjags, open and restart R, and run library(rjags). If you receive a message in your console that a link to JAGS was found, you are good to go.
  • Required R packages: There are several other R packages that are required for the course. You can install them by running the code linked here. This script will install all the packages needed for the course, in case you do not have them yet.
  • Working directory: please download the working directory .zip folder here and unzip on your computer. This folder contains all the scripts and data needed for the course.

📈 Models covered


📦 Downloads

Course materials


📚 Recommended reading