Graduate Student Needs Statistics Software Help
July 12, 2015 6:49 PM   Subscribe

Choosing a BUGS software with a comprehensible manual or understandable tutorial to allow progress to continue on thesis.

(Just to clear, I am asking for a friend who needs help but is not a MF member, I hope that is OK.)

A friend is working on their thesis in biology and needs help with selecting and more importantly learning to use something like WinBUGS, OpenBUGS, or JAGS to analyze her data. So far, none of the tutorials she has watched nor the manuals have clicked...but perhaps it's because she hasn't found the right web resource/videos/book.

What great resources can you reference to help her make progress with this?

(She doesn't have a preference to which program ends up being used, but needs to use something. Her adviser and committee have apparently been of no help in this regard.)
posted by maxwelton to Education (6 answers total) 3 users marked this as a favorite
I recommend a serious look at Andrew Gelman and Jennifer Hill Data analysis using regression and multilevel/hierarchical modeling. (Examples use Bugs in R.)
posted by lathrop at 7:30 PM on July 12, 2015 [1 favorite]

Why is she using a gibbs sampler when she could use the much better HMC sampler in STAN?
posted by MisantropicPainforest at 7:33 PM on July 12, 2015 [1 favorite]

Doing Bayesian Data Analysis, Second Edition: A Tutorial with R, JAGS, and Stan, by John Kruschke is a friendly, practical, and rigorous introduction to all the things mentioned in its title. Lots of worked examples and clear explanations. I don't know if it will suit her needs (it's written by a psychologist), but I recommend taking a look.
posted by rollick at 5:03 AM on July 13, 2015 [1 favorite]

[letting my husband borrow my account to answer]

I've found a few books that were really helpful for me. I'll second Gelman and Hill mentioned above, also Kruschke's Doing Bayesian Data Analysis is a softer introduction. An Introduction to WinBUGS for Ecologists, although it sounds specific to ecologists is actually a good general regression guide.

For software, I and most of my ecologist colleagues prefer JAGS. The syntax for WinBUGS, JAGS, and OpenBUGS are extremely similar, so if you learn how to use one program, you can pretty much use any of them. I frequently use code interchangeably in these programs. STAN has the most efficient sampler as far as I know, but the language is different I've been warned there can be issues with regressions on discrete values, like logisitic regressions (please chime in if you know more details about this).
posted by hydrobatidae at 5:10 AM on July 13, 2015 [1 favorite]

Stan can't do discrete sampling, so if that's what you need a gibbs sampler is the way to go, but 99% of the time that won't be an issue. This doesn't apply to logit or probit models, since the dependent variables aren't actually discrete, they are simply transformed to be constrained between 0 and 1.

Stan is coded in C++ so if you know that, the syntax will be very familiar. You do have to declare variables and stuff so its a hair trickier in that sense. The Stan manual is actually quite good as a reference.

For support, Stan has a very active google group. Also all the models in Gelman and Hill have been recoded in Stan and are online (Gelman helped create Stan).

nthing that Kruschke's book is a very good and accessible introduction.
posted by MisantropicPainforest at 6:09 AM on July 13, 2015

I found that WinBUGS and OpenBUGS were pretty simple to pick up. Sorry I don't have specific manuals to recommend, I was very fortunate to be able to take a class. If your friend is not familiar with R, WinBUGS or OpenBUGS might be the most intuitive. I find the directed acyclic graphs to be helpful in conceptualizing models, and I believe it may be possible to have BUGS translate the DAGs into code. I used rjags (an R package) for a while, and it was easy to translate from BUGS to JAGS.

My sense is that many models, especially relatively simple ones, can be estimated by the Gibbs samplers in BUGS and JAGS. I moved to Stan for a very specific reason related to the HMC sampler. I am not familiar with C++, so getting Stan installed was trickier, and interpreting errors and debugging was more difficult. It did solve my sampling problem, though.
posted by MrBobinski at 4:59 PM on July 13, 2015

« Older Pantone color values for the old Digital/DEC...   |   New York, Paris, Rome, oh my! Newer »
This thread is closed to new comments.