ggmcmc – diagnostic plots for MCMC with ggplot2

[This article was first published on JAGS News » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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.


To leave a comment for the author, please follow the link and comment on their blog: JAGS News » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)