O'Reilly logo

Case Studies in Bayesian Statistical Modelling and Analysis by Anthony N. Pettitt, Kerrie L. Mengersen, Clair L. Alston

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25

A Python Package for Bayesian Estimation using Markov Chain Monte Carlo

Christopher M. Strickland1, Robert J. Denham2, Clair L. Alston1 and Kerrie L. Mengersen1

1Queensland University of Technology, Brisbane, Australia

2Department of Environment and Resource Management, Brisbane, Australia

25.1 Introduction

The most common approach currently used in the estimation of Bayesian models is Markov chain Monte Carlo (MCMC). PyMCMC is a Python module that is designed to simplify the construction of Markov chain Monte Carlo (MCMC) samplers, without sacrificing flexibility or performance. Python has extensive scientific libraries, is easily extensible, and has a clean syntax and powerful programming constructs, making it an ideal programming language to build an MCMC library; see van Rossum (1995) for further details on the programming language Python. PyMCMC contains objects for the Gibbs sampler, Metropolis–Hastings (MH), independent MH, random walk MH, orientational bias Monte Carlo (OBMC) as well as the slice sampler; see for example Robert and Casella (1999) for details on standard MCMC algorithms. The user can simply piece together the algorithms required and can easily include their own modules, where necessary. Along with the standard algorithms, PyMCMC includes a module for Bayesian regression analysis. This module can be used for the direct analysis of linear models, or as a part of an MCMC scheme, where the conditional posterior has the form of a linear model. It also contains ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required