ggmcmc – diagnostic plots for MCMC with ggplot2

Xavier Fernández i Marín, who maintains the jags package on Gentoo Linux, writes to tell me he is developing the R package ggmcmc. This package is for visualizing Markov Chain Monte Carlo output using ggplot2 graphics and  should complement the existing plots for base and lattice graphics provided by coda. A comparison of all three graphical styles is given below.If you want to know more,  see the  tutorial by Xavier.

Trace plot from the ggmcmc package

xyplot using lattice graphics from coda

Standard coda trace plot

The samples are from the Classic BUGS example “Oxford”, after forcing  JAGS 3.3.0 to use the IWLS sampler in the glm module. As you can see, IWLS has an extremely low acceptance rate in this example, but if you run it long enough then you will see that it does generate valid samples from the posterior.

About these ads