Thursday, June 16, 2011

BRugs for Mac users

[You don't have to use BRugs any more; you can use JAGS instead. See this more recent post about JAGS.]

BRugs, as of now, can only be used with 32-bit Windows. Mac users must install and run through Windows (non-)emulators such as Wine. Here are some preliminary notes about how to install and use BRugs on a Mac.

Update: See also the more recent post regarding BRugs for Linux users.

Mac users: Please reply with additional tips, tricks, and info! (I am not a Mac user, so all of my info is 2nd hand.)

Installation:

In principle, the idea is to install 32-bit Windows R through Wine or WineBottler. In practice, I hear that this is not easy, and a search of the web shows some discussion that makes it seem like quite a process. Fortunately, the process has been nicely packaged by Jack Harris and posted by Seth Frey at http://enfascination.com/wiki/Weblog:Bayesian_data_analysis_on_a_Mac

Use:

Some of the Windows-friendly R commands are not interpreted properly on a Mac. Thanks to Chris Street for pointing out the following substitutions:

dev.copy2eps( file="blah" )
can be changed to
savePlot( filename="blah" , type="eps" )

At the command console,
help("command")
fails, but
??command
works.

Again, please reply (comment) with additional discussion.

7 comments:

  1. Another approach is to install it on a virtual windows machine using "Parallels" or "Fusion", which is fairly inexpensive software that runs Windows software at the same time as MacOS.

    ReplyDelete
  2. I also use Parallels when I need to use BRugs on my Mac. With all other methods, some keyboard shortcuts (and something else) don't work, thus writing/editing codes can sometimes become quite annoying.

    ReplyDelete
  3. I had a problem plotting: the graphs would have empty labels. Setting the plotting device to be X11 (i.e., replacing windows() with X11()) and setting par(family="mono") seem to solve the problem. Maybe this is a strange problem because my fonts are mixed up, but I'm posting it in case other people have these problems.

    ReplyDelete
  4. I'm not a Mac user (I use Linux) but have had good experience with a winBUGS/openBUGS alternative called "JAGS" (Just Another Gibbs Sampler) which runs fine on any platform and Mac OS X binaries should be available. It also has an associated R package called "rjags". As JAGS is based on the BUGS language, moving from BUGS to JAGS is very easy and all the examples in the book should work with minimal changes.

    ReplyDelete
  5. Unfortunately, the package from Jack Harris is no longer available. It looks like his advisor moved and the web site was taken down. Any chance you could get the file from him and post it here?

    ReplyDelete
  6. Dear Anonymous Oct. 22, 2011, 12:55 AM:

    The link to Jack Harris' package on Seth Frey's page has now been updated, so it should work again. Thanks for letting me know, and thanks again to Jack Harris.

    ReplyDelete
  7. There is a reason why I bought a Mac, it was not to be one of the cool kids that wanted the best of the best. No it was because of the music production I do on it. Hours and hours sitting in front of my Mac copying, pasting, moving, deleting, hour after hour just beating on my Mac in a endless assault to get my work done. That is the key part, my work. I work from home, it is great, but even if it is from home it is still work and it still needs to get done. So my Mac, I have it because it is fast, gets the job done and comes back for more.

    But what happens when it doesn't want to do those things anymore?

    I move around massive amounts of information and yes even on the almighty Mac this can cause a problem after a while. Things fragment, programs get corrupted issues come up. My light speed Mac slows down to a crawl and all of the sudden I simply can not get any work done. Because I work from home there is no IT guy to call and ask to come fix it. No instead I have to figure out what is wrong. I am lucky, I did, but not after trying everything under the sun first and wasting countless hours looking for one program that can do what I needed instead of ten programs. One program to lead them all….okay that was a lame Lord of the rings reference, but that program was/is Detox My Mac. A simple to use program that did not just fix my issues, it put my Mac on overdrive again. A few clicks and my Mac was clean and ready to rock and roll again.

    Read more here:- http://detox-my-mac.com?duhhf9265hskfhf98346

    ReplyDelete