Archive for June 15th, 2009

h1

OpenBUGS and WinBUGS on Mac OS X

June 15, 2009

I haven’t found a really good how-to for getting OpenBUGS and WinBUGS up and running on Mac OS X, so I thought I’d create a little how-to. Setting up these programs is super easy but requires MacPorts and wine .

First, you need to have the Xcode developer tools installed. Go to Apple, create an account, and download them.

Second, install MacPorts (get it here for 10.5) by clicking the *.dmg file.

Third, open a terminal and type:

sudo port install wine

This will take about 20 minutes to compile wine and all its dependencies.

Fourth, download the WinBUGS zip file here and the OpenBUGS zip file here .

Fifth, unzip the WinBUGS file by double clicking on it and it will create a folder called WinBUGS14. Move this to Applications. For OpenBUGS, I had to create a folder called OpenBUGS, move the zip file there, open up a terminal, and type unzip OpenBUGS.zip (double clicking this file did not work thus I fired up a terminal). This folder I then moved to Applications.

Sixth, to start WinBUGS open a terminal and type the following:

cd /Applications/WinBUGS14
wine WinBUGS14.exe

For OpenBUGS, open a terminal and type the following (assuming you created a folder named OpenBUGS with all the file from the OpenBUGS.zip files in them):

cd /Applications/OpenBUGS
wine winbugs.exe

Everything seems to work fine. The only thing I’ve noticed is that the fonts are not as nice in wine as they are in Windows and in WinBUGS some of the documentation doesn’t work properly (e.g. clicking on links does nothing), whereas in OpenBUGS they work flawlessly.

Please leave comments if this works/doesn’t work for you.

EDIT June 1st 2010
I see that lots of people have been coming here to learn how to install OpenBUGS and WinBUGS on Mac OS X. What I would like to do is to encourage you to use JAGS and rjags instead of *BUGS. It is very similar to *BUGS, can do nearly the same things as *BUGS, and is opensource. So please consider JAGS instead of *BUGS.