Introduction
From this page you can download a set of Matlab function for some statistical MCMC analyses of mathematical models. This code might be useful to you if you are already familiar with Matlab and want to do MCMC analysis using it.
For a more comprehensive and better documented and maintained software for MCMC, see
This toolbox provides tools to generate and analyse Metropolis-Hastings MCMC chain using multivariate Gaussian proposal distribution. The covariance matrix of the proposal distribution can be adapted during the simulation according to adaptive schemes described in the references.
The code can do the followingProduce MCMC chain for user written -2*log(likelihood) and -2*log(prior) functions. These will be equal to sum-of-squares functions when using Gaussian likelihood and prior.
In case of Gaussian error model, sample the model error variance from the conjugate inverse chi squared distribution.
Do plots and statistical analyses based on the chain, such as basic statistics, convergence diagnostics, chain timeseries plots, 2 dimensional clouds of points, kernel densities, and histograms.
Calculate densities, cumulative distributions, quantiles, and random variates for some useful common statistical distributions without using Mathworks own statistics toolbox.
The code is self consistent, no additional Matlab toolboxes are used. However, a quite recent version of Matlab is needed. The documentation might get better gradually, but in the mean while please look at the following page: