Improved ANOVA scripts in Kruschke’s DBDA

Fri 20 April 2012 by Adrian Brasoveanu

John Kruschke made a couple of changes to the hierarchical Bayesian ANOVA scripts in his “Doing Bayesian Data Analysis” book. An important one is changing the hyperprior on the SD parameter. Here’s a lightly edited quote:

The previous version (see p. 496) had the folded-t prior recommended by Gelman (2006), which required adding a small constant 0.1 to keep the SD from venturing extremely close to 0 — shrinkage can become overwhelmingly strong when the SD is very close to 0 and there are many groups with few data points per group. But then the SD parameter can never be less than 0.1, which is unlikely to reflect a real prior belief. The new prior is a gamma prior with a mode at 0.1 and a standard deviation of 10, which seems to be an appropriate scaling when the data are standardized. This prior smoothly drops down to 0 as the parameter value gets close to 0. For how to specify a gamma prior with a desired mode and standard deviation, see this post. The prior on the within-cell SD remains uniform, as recommended by Gelman (2006).

For more details, go here.