Grapham: graphical models with adaptive random walk Metropolis algorithms



Adaptive (non-Markovian) MCMC methods have gained increasing interest in the last few years. The first of the introduced methods, the “Adaptive Metropolis” was shown to provide valid simulation from the target distribution in the seminal paper by Haario, Saksman, and Tamminen (Bernoulli 7, 2001, no. 2). Since then, many similar adaptive methods have been introduced, and their theoretical properties have been studied.

Grapham is a free (GPL'd) experimental tool for MCMC sampling in a hierarchical (or “graphical”) model, using adaptive random-walk-based MCMC methods, including

Grapham is implemented in C and uses Lua as a model specification (and scripting) language. There are also simple data import tools for R and Matlab/Octave.


The source distribution is recommended; the binaries may be outdated and may not work on all systems. The source has been compiled succesfully at least with GCC 4.1.2 and 4.0.3 in Linux, and MinGW GCC 3.4.2 in Windows XP (with dlfcn-win32).




Please notice that Grapham is experimental code, written by the author primarily for personal use. The software may have undesirable restrictions or inconsistencies, even bugs, and the documentation may not be entirely detailed.


If you notice some bugs, or have some suggestions, the author of Grapham, Matti Vihola, can be contacted by email <mvihola at iki dot fi>.

The static address of this page is