Lexical scope and function closures in R
Introduction R is different to many “easy to use” statistical software packages – it expects to be given commands at the R command prompt. This can be intimidating for new users, but is at the heart of...
View ArticleParallel particle filtering and pMCMC using R and multicore
Introduction In a previous post I showed how to construct a PMMH pMCMC algorithm for parameter estimation with partially observed Markov processes. The inner loop of a pMCMC algorithm consists of...
View ArticleCatalogue of my first 25 blog posts
This is my 25th blog post, so this seems like a good time to provide an index to those first 25 posts for ease of reference. I’ve covered a range of topics over my first two years of blogging, and...
View ArticleMultivariate data analysis (using R)
I’ve been very quiet on-line in the last few months, due mainly to the fact that I’ve been writing a new undergraduate course on multivariate data analysis. Although there are many books and on-line...
View ArticleGibbs sampling a Gaussian Markov random field (GMRF) using Java
Introduction As I’ve explained previously, I’m gradually coming around to the idea of using Java for the development of MCMC codes, and I’m starting to build up a collection of simple examples for...
View ArticleMetropolis Hastings MCMC when the proposal and target have differing support
Introduction Very often it is desirable to use Metropolis Hastings MCMC for a target distribution which does not have full support (for example, it may correspond to a non-negative random variable),...
View ArticleMCMC on the Raspberry Pi
I’ve recently taken delivery of a Raspberry Pi mini computer. For anyone who doesn’t know, this is a low cost, low power machine, costing around 20 GBP (25 USD) and consuming around 2.5 Watts of power...
View ArticleInlining JAGS models in R scripts for rjags
JAGS (Just Another Gibbs Sampler) is a general purpose MCMC engine similar to WinBUGS and OpenBUGS. I have a slight preference for JAGS as it is free and portable, works well on Linux, and interfaces...
View ArticleKeeping R up to date on Ubuntu linux
R is included as part of the standard Ubuntu distribution, and can be installed with a command like sudo apt-get install r-base Obviously the software included as part of the standard distribution...
View ArticleGetting started with Bayesian variable selection using JAGS and rjags
Bayesian variable selection In a previous post I gave a quick introduction to using the rjags R package to access the JAGS Bayesian inference from within R. In this post I want to give a quick guide to...
View ArticleIntroduction to Approximate Bayesian Computation (ABC)
Many of the posts in this blog have been concerned with using MCMC based methods for Bayesian inference. These methods are typically “exact” in the sense that they have the exact posterior distribution...
View ArticleSummary stats for ABC
Introduction In the previous post I gave a very brief introduction to ABC, including a simple example for inferring the parameters of a Markov process given some time series observations. Towards the...
View ArticleParallel tempering and Metropolis coupled MCMC
Introduction Parallel tempering is a method for getting Metropolis-Hastings based MCMC algorithms to work better on multi-modal distributions. Although the idea has been around for more than 20 years,...
View ArticleMarginal likelihood from tempered Bayesian posteriors
Introduction In the previous post I showed that it is possible to couple parallel tempered MCMC chains in order to improve mixing. Such methods can be used when the target of interest is a Bayesian...
View ArticleA functional Gibbs sampler in Scala
For many years I’ve had a passing interest in functional programming and languages which support functional programming approaches. I’m also quite interested in MOOCs and their future role in higher...
View ArticleScala as a platform for statistical computing and data science
There has been a lot of discussion on-line recently about languages for data analysis, statistical computing, and data science more generally. I don’t really want to go into the detail of why I believe...
View ArticleBrief introduction to Scala and Breeze for statistical computing
Introduction In the previous post I outlined why I think Scala is a good language for statistical computing and data science. In this post I want to give a quick taste of Scala and the Breeze numerical...
View ArticleIntroduction to the particle Gibbs sampler
Introduction Particle MCMC (the use of approximate SMC proposals within exact MCMC algorithms) is arguably one of the most important developments in computational Bayesian inference of the 21st...
View ArticleParallel Monte Carlo using Scala
Introduction In previous posts I have discussed general issues regarding parallel MCMC and examined in detail parallel Monte Carlo on a multicore laptop. In those posts I used the C programming...
View ArticleTuning particle MCMC algorithms
Several papers have appeared recently discussing the issue of how to tune the number of particles used in the particle filter within a particle MCMC algorithm such as particle marginal Metropolis...
View Article