Installation of WinBUGS on Mac Lion Below you can find an instruction on how to install WinBUGS on Mac Lion and on how to use R2WinBUGS (R package that enables you to run WinBUGS from R). This installation involves Wine – a compatibility program for running Windows programs on Macs. Before you start, make sure that you have X11 installed. This article applies to Mac OS X v10.5 and earlier. For Mac OS X v10.6 or later information, see this article instead. Icon magnification can be changed in the Dock preferences. Running WinBUGS on Mac OS X using Wine Tom Palmer1 [email protected] October 9, 2007 Summary These instructions are for installing WinBUGS on Mac OS X 10.4 (Tiger) using a compatibility program for running Windows programs on Unix called Wine. They have been tested on a Mac with an Intel processor. As an overview: install the X11. • Install in your applications folder. • Go to On this website, you can download WinBUGS. You should select “zipped version of the whole file structure” (2nd bullet point under “Quick start”) • Unzip the WinBUGS folder and put it in your application folder. • Open Wine.app in your applications folder (installed in step 1). Go to the WinBUGS folder and click on WinBUGS.exe. • Go again to Download the immortality key and safe it as a text file. • Open WinBUGS through Wine as described in step 4. Open the text file containing the immortality key in WinBUGS. Click on Tools → Decode → Decode all. • Go again to Download the patch and safe it as a text file. • Open WinBUGS through Wine as described in step 4. Open the text file containing the patch in WinBUGS. ![]() Click on Tools → Decode → Decode all. This should complete your installation of WinBUGS. You should now be able to run WinBUGS. • If you want to run WinBUGS from R using the package R2WinBUGS, you have change bugsdir – the directory where WinBUGS is installed – and you have to provide the paths to wine and winepath binary files in the bugs() call (see example below). Samples = bugs(data, inits, parameters, model.file, n.chains, n.iter, n.burnin, n.thin, bugs.directory = '/Applications/WinBUGS14', WINE = '/Applications/Wine.app/Contents/Resources/Java/bin/wine', WINEPATH = '/Applications/Wine.app/Contents/Resources/Java/bin/winepath'). I have long used to do all of my Bayesian work on my mac. Early on, I tried to figure out how to install and and their accompanying R libraries on my mac, but, to no avail. I just had too hard of a time getting them running and gave up. But, it would seem that some things have changed with lately, and it is now possible to not only get WinBUGS itself running nicely on a mac, but to also get R2WinBUGS to run as well. Or at least, so I have discovered after an absolutely heroic (if I do say so myself) effort to get it all running (this was to help out some students I’m teaching who wanted to be able to do the same exercises as their windows colleagues). So, I present the steps that I’ve worked out. I do not promise this will work for everyone – and in fact, if it fails at some point, I want to know about it so that perhaps we can fix it so that more people can get WinBUGS up and running. Or just run JAGS (step 1} install, step 2} install rjags in R. Modify your code slightly. Other back up programs for mac. Be happy.) So, this tutorial works to get the whole WinBUGS shebang running. Note that it hinges on installing the latest development version of Wine, not the stable version (at least as of 1/17/12). If you have previously installed wine using macports, good on you. Now uninstall it with “sudo port uninstall wine”. Otherwise, you will not be able to do this. 1) Have the free version of XCode Installed from. You may have to sign up for an apple developer account. You’re a developer now! 2) Have X11 Installed from your system install disc. 3) Install and install from the package installer. See also for more information. Afterwards, open the terminal and type echo export PATH=/opt/local/bin:/opt/local/sbin:$PATH$'n'export MANPATH=/opt/local/man:$MANPATH| sudo tee -a /etc/profile You will be asked for your password. Don’t worry that it doesn’t display anything as you type. Press enter when you’ve finished typing your password. 4) Open your terminal and type sudo port install wine-devel 5) Go have a cup of coffe, check facebook, or whatever you do while the install chugs away. 6) Download WinBUGS 1.4.x from. Also download the immortality key and the patch. 7) Open your terminal, and type cd Downloads wine WinBUGS14.exe Note, if you have changed your download directory, you will need to type in the path to the directory where you download files now (e.g., Desktop). 8 ) Follow the instructions to install WinBUGS into c:Program Files. 9) Run WinBUGS via the terminal as follows: wine ~/.wine/drive_c/Program Files/WinBUGS14/WinBUGS14 10) After first running WinBUGS, install the immortality key. Close WinBUGS. Open it again as above and install the patch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2019
Categories |