I am interested in fitting a Bayesian Two Factor ANOVA in BUGS or by utilizing some R package. Unfortunately I am having a hard time finding resources on this topic. Any suggestions? Even an article describing the approach would be helpful.
3 Answers
Simon Jackman has some working code for fitting ANOVA and regression models with JAGS (which is pretty like BUGS), e.g. two-way ANOVA via JAGS (R code) or maybe among his handouts on bayesian analysis for the social sciences.
A lot of WinBUGS code, including one- and two-way ANOVA, seem to be available on the companion website for Bayesian Modeling Using WinBUGS: An introduction.
I'm a bit late to the show here, but John Kruschke's recently published book Doing Bayesian Data Analysis: A Tutorial with R and BUGS
has a whole chapter (19) on this. His book is written in a highly accessible and practical style, well worth checking out for his description of the approach. He also includes R and BUGS code for his examples.
His website accompanying the book is interesting reading also: http://www.indiana.edu/~kruschke/DoingBayesianDataAnalysis/ and includes all the code in the book.
See Chapter 10 of Marc Kery's book Introduction to WinBUGS for Ecologists, where he compares a two-way ANOVA in R with several versions of the model in WinBUGS. (The book has lots of great examples; ecology not a pre-requisite.) Website for the book is here: http://www.mbr-pwrc.usgs.gov/software/kerybook/