R Package MCMC

Package

At CRAN (package mcmc).

This web page is about an R package for doing simple, but general MCMC. It does random-walk Metropolis for an arbitrary continuous distribution on Rd specifed by an unnormalized density computed by a user-supplied R function.

Since version 0.9-3 it has included functions written by Leif Johnson that implement geometrically ergodic MCMC via parameter transformation. This was the subject of a paper in the Annals of Statistics.

For more info see the package vignettes

or see the reference manual for the package, especially the help pages for the functions metrop, morph.metrop, temper, and initseq, which computes Monte Carlo standard errors using the initial sequence methods of Geyer (1992, Statistical Science).

Brent Perreault tells me he has reimplemented the R function initseq in Matlab. That code is here.

Talk

Not just about this package, but made to go with it are the slides for the talk given at the Institute for Mathematics and its Application Sep 16, 2003

R Package Potts

In a separate package potts, also at CRAN (package potts), is an implementation of the Swendsen-Wang algorithm for Potts models.