J. Andres Christen and Colin Fox
CIMAT, Mexico, and U. of Otago, New Zealand.
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.
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 R version:
Thanks to the very generous help of Dr Alireza Mahani <alireza dot s dot mahani at gmail dot com>, correcting many errors and pitfalls in the design of the package, the R version is now in the CRAN. Please use the CRAN to download the Rtwalk package.
The R is now a standard R package and has been recompiled for R 3.+ . Version 3 of R is not backward compatible and requires all packages to be recompiled. Please install this new version.
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
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!
Download and install the Rtwalk package from the CRAN
> 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.
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: 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.