Monday 10 June 2013

Running time

Marta and I are doing some re-analysis of our Eurovision contest (some context here and here). We have slightly modified our original model (mostly, I have navigated the mess in Marta's notation $-$ it's OK: I'm not at risk of her mighty wrath, as I've already joked about this with her!). Also, we've included the latest data (in fact, we're doing a little prediction as well, pretending that all the covariates are known, but the actual results aren't).

Last time around, Marta ran the model using parallelisation (through the R package snowfall) in WinBUGS on her Windows desktop, at work. The model is relatively complex (see here for a working description), but thanks to parallelisation the running time was not too bad (as I recall, about 3 hours to run 11000 iterations with a burn-in of 1000 and thinning of 20).

This time, I decided I would get my hands dirty on my Linux machine(s). To start with, I thought I'd give it a go using R2jags and its new(-ish) function jags.parallel, which is supposed to run multiple instances of the MCMC process at once. Unfortunately, that didn't work. I searched on line for some clue and found people sharing their common experiences. I don't really know what's failing, but JAGS complains that a node (which I'm actually passing as data) is not found.

So, thinking that running software natively rather than via emulation would be most efficient, I decided to install OpenBUGS and run the model using snowfall and R2OpenBUGS. This was better: I was able to check the model and load the data. But when it came to compiling the model, OpenBUGS took for ever $-$ I think for some reasons it was getting stuck with something. It was a bit surprising, as I thought that this would be a very robust and reliable alternative.

So, I decided to try and see how WinBUGS would do. I installed WINE and ran the model using R2WinBUGS and again through snowfall $-$ effectively replicating the exact procedure that Marta used last year. To my surprise, things have worked out quite OK and I shaved about an hour from Marta's previous attempt (mainly through blocking of some of the parameters). 

No comments:

Post a Comment