Workshop: Bayes factors for linear models

Introduction

Bayesian analysis is quickly becoming part of the standard in the behavioural and social sciences. It has many advantages over some of the standard analyses: easier interpretation of parameter estimates, straightforward implementation and fitting of complex multilevel models, the ability to argue for models with null effects over more complex ones, and a principled accounting of epistemic uncertainty. Bayesian analysis is a powerful tool for scientific data analysis. One of the most compelling aspects of Bayesian analysis is the ability to formally compute statistical evidence. The Bayes factor — a measure of rational belief change compelled by the data — is a straightforward measure of evidence from the data.

Although Bayes factors have been used and advocated by Bayesian statisticians over half a century, there have been several obstacles to the widespread adoption of Bayes factors: development of acceptable “default” families of priors, and the difficulty of computing Bayes factors. Recently several advances in the Bayesian literature that have made Bayes factors a plausible. Liang, Paulo, Molina, Clyde, and Berger (2008) and Rouder, Morey, Speckman, and Province (2012) have developed “default” priors that are suitable for analysis of regression designs and ANOVA designs, respectively. Morey and Rouder have developed BayesFactor, a software package in R that computes the Bayes factors via an interface familiar to users of the lme4 and arm packages. BayesFactor computes Bayes factors in regression and ANOVA (including models with crossed random effects), and estimation parameter posteriors through MCMC. The software is easy-to-use and freely-available; a short overview can be found at http://bayesfactorpcl.r-forge.r-project.org/. The BayesFactor package makes Bayesian analysis of linear mixed models and linear regression models simple:

anovaBF(RT ~ shape * color + ID, data = puzzles, whichRandom = "ID")
## Bayes factor analysis
## --------------
## [1] shape + ID                       : 2.914 (1.39%)
## [2] color + ID                       : 2.866 (1.42%)
## [3] shape + color + ID               : 12.22 (1.6%)
## [4] shape + color + shape:color + ID : 4.276 (2.01%)
## ---
##  Denominator:
## Type: BFlinearModel, JZS
## RT ~ ID

plot of chunk unnamed-chunk-3

(In this linear mixed model analysis, the Bayes factors indicate that the data favor the main-effects model over the intercept-only model by a factor of about 12.)

Workshop outline

  1. Introduction to Bayesian analysis
  2. Bayes factors
  3. The BayesFactor package
  4. BayesFactor in practice

References

Liang, F. and Paulo, R. and Molina, G. and Clyde, M. A. and Berger, J. O. (2008). Mixtures of g-priors for Bayesian Variable Selection. Journal of the American Statistical Association, 103, pp. 410-423 (PDF)

Rouder, J. N. and Morey, R. D. and Speckman, P. L. and Province, J. M. (2012), Default Bayes Factors for ANOVA Designs. Journal of Mathematical Psychology, 56, pp. 356–374 (PDF)