Looking at microbes with BUGS

I’m working on a paper with Heidi Salonen, a Finnish microbiologist who’s been with us for quite some time and is working on the microbiological (e.g. fungi, bacteria) aspects of the UPTECH project. Due to the timeframes of our presence at each school and the amount of time it takes to measure microbiological activity, we only have a handful of measurements at each school. This represents a perfect opportunity to do some very simple Bayesian hierarchical modelling in order to estimate a distribution of possible microbe concentrations at each school.

It’s not a particularly taxing task (it’s more or less the kind of thing that you might find in Gelman’s textbook) but it’s still a nice example of how you can use Bayesian modelling to estimate the mean of a bunch of schools by assuming that the mean and standard deviation at each school are themselves drawn from a distribution of means and standard deviations. I’ve done the modelling, sure, but the next step is to explain it to Heidi and the other co-authors in such a way that they feel comfortable putting something in the paper that’s a little beyond taking the mean of the data and standard deviation of the data as summaries for the microbial concentrations at each school.

So it was nice to dust off the old OpenBUGS and write out a simple model with prediction within each school based on the repeated sampling available to us. We hope to use this simple model as the basis of a model which includes covariates and perhaps a bit more random effects modelling. So I don’t have to keep manually copying and pasting data from Excel files I’ll be looking at getting back into using rjags, r2jags, BRugs and R2WinBUGS. One of my colleagues in BRAG thinks I should just write my own sampler in MATLAB for this as it’ll be faster, but with so few observations (6-15 at each of 25 schools) speed’s not a huge issue here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s