Abstract
Markov chain Monte Carlo (MCMC) estimation provides a solution to the complexintegration problems that are faced in the Bayesian analysis of statistical problems. Theimplementation of MCMC algorithms is, however, code intensive and time consuming. Wehave developed a Python package, which is called PyMCMC, that aids in the constructionof MCMC samplers and helps to substantially reduce the likelihood of coding error, aswell as aid in the minimisation of repetitive code. PyMCMC contains classes for Gibbs,Metropolis Hastings, independent Metropolis Hastings, random walk Metropolis Hastings,orientational bias Monte Carlo and slice samplers as well as specific modules for commonmodels such as a module for Bayesian regression analysis. PyMCMC is straightforwardto optimise, taking advantage of the Python libraries Numpy and Scipy, as well as beingreadily extensible with C or Fortran.