Keywords: Markov Chain Monte Carlo, graphical models, BUGS


The BUGS language is a declarative language that syntactically resembles R and is used to describe Bayesian hierarchical models. It was developed at the MRC Biostatistics Unit, Cambridge, UK in the early 1990s along with the WinBUGS software (later OpenBUGS: ). WinBUGS combined three key ideas: Bayesian inference, graphical models and Markov Chain Monte Carlo (MCMC) and did much to popularise Bayesian statistics.

As the name suggests, WinBUGS runs only on Windows. JAGS (Just Another Gibbs Sampler) is a cross-platform engine for the BUGS language. There are several R packages that interface to JAGS (rjags, runjags, jagsUI, R2jags).

Learning objectives

At the end of the tutorial, participants should understand the following:


Participants should bring a laptop with R and JAGS ( ) installed as well as the CRAN packages rjags, runjags, R2jags and jagsUI.

Participants should have a basic knowledge of the principles of Bayesian inference. No previous knowledge of MCMC or graphical model is required.

Instructor biography

Martyn Plummer (@martyn_plummer) works at the International Agency for Research on Cancer, a specialized agency of the World Health Organisation based in Lyon, France. He is a member of the R Core Team and is co-President of the R Foundation.


Lunn D, Jackson C, Best N, Thomas A, Spiegelhalter D (2013). The BUGS Book: A Practical Introduction to Bayesian Analysis, CRC Press.