The t-walk software
J. Andres Christen and Colin Fox
CIMAT, Mexico, and U. of Otago, New Zealand.

Updated


The t-walk is a "A General Purpose Sampling Algorithm for Continuous Distributions" to sample from many objective functions (specially suited for posterior distributions using non-standard models that would make the use of common algorithms and software difficult); it is an MCMC that does not required tuning.  However, as mentioned in the paper, it may not perform well in some examples and fine tuned samplers to specific objective densities should perform better than the t-walk.

It is now implemented in Python, R, C++, C (native stand alone) and MatLab, see below.

The paper is now published:

Christen, J.A. and Fox, C. (2010), "A General Purpose Sampling Algorithm for
Continuous Distributions (the t-walk)",
Bayesian Analysis, 5(2), 263-282.

And is now available online: http://ba.stat.cmu.edu/journal/2010/vol05/issue02/christen.pdf



The implementations:


The R version is now a standard R package.  A new version recompiled for R 3.+ . Version 3 of R is not backward compatible and requires all packages to be recompiled.  Please download this new version.

The Python version is also a standard Python package.  It is "pure" Python, therefore is platform independent.  It requires the ScyPy package and, optionally, the PyLab package as well for some basic plotting methods.  Download the ziped file and follow the README instructions within. 
My students Diego Andrés Pérez and Mario Santana found a small mistake in the calculation of the
IAT in the Python version.  Now this is corrected in the pytwalk version 1.2.

The C++ implementation has only been compiled in Linux and Mac OS, but most likely will compile in many other Unix flavor OS's.  It requires the GNU scientific library, gsl.  Download the ziped file and follow the README instructions within.  Tony Begg found two small buggs, which are corrected in this new version.

The pure C version Tony Begg has done a very handy, stand alone (does not require the gsl or any other special library), single file, Open Source, pure C version of the t-walk!


R: R source package Rtwalk_1.7.0.tar.gz  In UNIX, including Mac, do

    % sudo R CMD INSTALL Rtwalk_1.7.0.tar.gz

For Windows insatall (Packages->Local ...) the package: Rtwalk_1.7.0.zip

Include it with

> rm(list=ls(all=TRUE))

> library(Rtwalk) ## and follow the online help:

> help(Rtwalk) ## or with help.start() and look for the Rtwalk package in your browser

Also see the examples.R for more help.



Python: This is a standard Python module: pytwalk-1.3.1.tar.gz 

Download the pytwalktutorial.py for examples.  However, I changed the name to pytwalk, instead of
simply twalk, to follow the Python tradition.


MatLab: The twalk is not here available in MatLab, please ask Colin.



C++: cpptwalk.tar.gz 

C: Ctwalk.tar.gz See the main() function for an example.

If you have any troubles or comments please contact (me) Andres <jac at cimat dot mx> for the Python, R and C++ versions and Colin <fox at physics dot otago dot ac dot nz> for the MatLab version and Tony Begg <Tony.Begg at dataventures dot com> for the C example.


Updated:

Wed, 19 Jun 2013, 23:37:05 CDT