We have provided some sample code to help you understand MCMC techniques such as Gibbs sampling, Metropolis, and Gibbs-Metropolis.

Note that all of the faculty examples use the data in faculty.dat

Gibbs Sampling

In the following example, Gibbs sampling is used with sampling from the complete conditionals.

Metropolis

In the following example, the Metropolis algorithm is used to sample from a Cauchy distribution.

Gibbs-Metropolis Combo

This code implements a combo MCMC algorithm using Gibbs sampling, with Metropolis sampling at each node:

Evilplot

Evilplot files are listed below. A simple way to get everything needed for evilplot is to run the following command:

  git clone git://aml.cs.byu.edu/evilplot.git