# Blog Archives

## A simple explanation of rejection sampling in R

April 22, 2015
By

The central quantity in Bayesian inference, the posterior, can usually not be calculated analytically, but needs to be estimated by numerical integration, which is typically done with a Monte-Carlo algorithm. The three main algorithm classes for doing so are Rejection sampling Markov-Chain Monte Carlo (MCMC) sampling Sequential Monte Carlo (SMC) sampling I have previously given…

## A simple explanation of rejection sampling in R

April 22, 2015
By

The central quantity in Bayesian inference, the posterior, can usually not be calculated analytically, but needs to be estimated by numerical integration, which is typically done with a Monte-Carlo algorithm. The three main algorithm classes for doing so are Rejection sampling Markov-Chain Monte Carlo (MCMC) sampling Sequential Monte Carlo (SMC) sampling I have previously given…

## Female hurricanes reloaded – another reanalysis of Jung et al.

June 6, 2014
By

I have blogged a few days a ago about a study by Kiju Jung that suggested that implicit bias leads people to underestimate the danger of female-named hurricanes. The study used historical data to demonstrate a correlation between femininity and death-toll, and subsequent experiments seemed to show that people indeed estimate hurricanes to be less…

## Explaining the ABC-Rejection Algorithm in R

June 2, 2014
By

Approximate Bayesian Computation (ABC) is an umbrella term for a class of algorithms and ideas that allow performing an approximate estimation of the likelihood / posterior for stochastic simulation models when the likelihood cannot be explicitly calculated (intractable likelihood). To give you the idea in a nutshell: to approximate the likelihood, consider that for a…

## Sampling design combinatorics

January 14, 2014
By

A colleague had a question about sampling design and we didn’t find a good answer … so, if you like to solve riddles, you might like that one: We want to distribute n=3 plant species across k=12 x m=12 grid cells, in a way that no individual has another individual of it’s own species in…

## The EasyABC package for Approximate Bayesian Computation in R

December 2, 2012
By

A comment on a recent post gave me the motivation to try out the new EasyABC package for R, developed by Franck Jabot, Thierry Faure, Nicolas Dumoulin and maintained by Nicolas Dumoulin. Approximate Bayesian Computation (ABC) is a relatively new method that allows treating any stochastic model (IBM, stochastic population model, …) in a statistical…

## A simple Approximate Bayesian Computation MCMC (ABC-MCMC) in R

July 15, 2012
By

Approximate Bayesian Computing and similar techniques, which are based on calculating approximate likelihood values based on samples from a stochastic simulation model, have attracted a lot of attention in the last years, owing to their promise to provide a general statistical technique for stochastic processes of any complexity, without the limitations that apply to “traditional”…

## MCMC chain analysis and convergence diagnostics with coda in R

December 9, 2011
By

Last week, I gave a seminar about MCMC chain analysis and convergence diagnostics with coda in R, and I thought a summary would make a nice post. As a prerequisite, we will use a few lines of code, very similar to a previous post on MCMC sampling. In the code, we create some test data…

## A simple Metropolis-Hastings MCMC in R

September 17, 2010
By

While there are certainly good software packages out there to do the job for you, notably BUGS or JAGS, it is instructive to program a simple MCMC yourself. In this post, I give an educational example of the Bayesian equivalent of a linear regression, sampled by an MCMC with Metropolis-Hastings steps, based on an earlier…