View Zhirong Zhao's profile on LinkedIn

Blogroll

My pages

Visitors

Powered by

UThinkrunning MT v.4.25

Header image of Hong Kong financial center courtesy of hleung on flickr.

Running Bayesian models with Mac

The most commonly used software for Bayesian modeling is WinBUGS, based on the BUGS (Bayesian inference Using Gibbs Sampling) project, which was started in 1989 for the Bayesian analysis of complex statistical models using Markov Chain Monte Carlo (MCMC) methods. Some good examples of WinBUGS are included in Gelman and Hill’s Data Analysis Using Regression and Multilevel/Hierarchical Models.

WinBUGS, however, was written to run under Microsoft Windows. Mac user may use several ways to bypass the difficulty, even without Boot Camp or VMware/Parallels:

1. Use BRugs package to run OpenBUGS (manuals), which is the open source variant of WinBUGS;

2. Use JAGS (Just Another Gibbs Sampler), which a the Unix-based engine to run MCMC. I remember that it was a little tricky to compile JAGS in Mac, and has yet to recovered some helpful hints that I came across before;

3. Run WinBUGS through Darwine (which I learned from this post shared by Lynn);

4. Run WinBUGs on a Mac through CrossOver:

I failed to install the WinBUGS following the above instruction. The process looked promising at the beginning with the WinBUGS windows popping up, but the installer kept crashing at the last second and leaving nothing about WinBUGS in the CrossOver folder.

Finally, I used a dirty trick -- I moved the unzipped WinBUGS14 folder into the CrossOver folder where it was supposed to be ([username]/Library/Application Support/CrossOver/Bottles/****/drive_c/Program Files) -- and it works!

The procedure may seem unnecessary now that we have the Darwine solution. It is part of my experiments with CrossOver, which I hope to use with many more “unsupported” programs. ¤

winbugs.jpg

Comments

That's exactly why I don't want to buy a Mac, :).

But you haven't experienced many other benefits that can only be enjoyed by Mac users, those things that Windows users may not even think about, let alone trying to get with some extra efforts:)

Thanks for your help with installing BUGS. I got it working with CrossOver. For what it's worth, I didn't get it working with any version of Wine, so you can feel good you didn't waste time with that. Some do apparently get it working with wine, though.

This is what I have been looking for. The Darwine install was super easy... almost too easy. These days, I'm unused to Windoze programs working with a simple double click.

Post a comment

Hubert H. Humphrey Institute of Public Affairs