Doing Bayesian Data Analysis With R and BUGS
Doing Bayesian Data Analysis With R and BUGS
Topics
Familiarization with software: R, BRugs, BUGS. See installation instructions before arriving at the tutorial.
Uncertainty and Bayes rule: Application to the rational
estimation of parameters and models, given data.
Markov chain Monte Carlo: Why its needed, how it works,
and doing it in BUGS.
Hierarchical models: Flexibility for modeling individual
differences, group effects, repeated measures, etc.
Bayesian (multiple) linear regression: Bayesian inference
reveals trade-offs in credible regression coefficients.
Bayesian analysis of variance: Encourages thorough multiple comparisons, with no need for balanced designs.
Bayesian power analysis and replication probability:
Straight forward meaning and computation.
Why go Bayesian?
Scientists in fields from astronomy to zoology are making
Bayesian data analysis their standard operating procedure.
Figure 1 (humorously) suggests this trend. Bayesian data
analysis delivers many practical benefits:
15
10
5
An introduction to doing
Bayesian data analysis
50
100
150
cluding multiple comparisons, because there are no penalizing corrections for multiple comparisons as in p-value
based decisions. Bayesian methods instead create rational
shrinkage informed by the data.
Model flexibility allows conceptual transition from generic
descriptive models to domain-specific models wherein parameters serve psychometric purposes.
Bayesian methods permit different sample sizes in different
groups, and different sample sizes per subject, unlike traditional ANOVA which has troubles with unbalanced designs.
Bayesian methods allow data collection to stop at any time,
unlike p-value based decisions that require a pre-set stopping criterion, such as fixed sample size, and no peeking at
the data.
Bayesian hypothesis testing permits a principled way to assess evidence in favor of a null hypothesis, unlike NHST.
Bayesian methods allow cumulative science and use of
prior knowledge for leveraged inference when data are
sparse, unlike traditional methods.
Power and replication probability are straight forward to
estimate with Bayesian methods, but difficult to assess in
p-value based methods.
20th century methods, based on p values, have numerous
deep problems that are avoided with Bayesian methods.
The tutorial does not address all the points listed above,
but does illustrate many of them with examples from linear
regression and ANOVA. For a brief discussion of several benefits of Bayesian data analysis, along with a worked example,
and an emphasis that Bayesian data analysis is not Bayesian
modeling of mind, see Kruschke (2010c). For a lengthier exposition that explains one of the primary pitfalls of null hypothesis significance testing and has a discussion of Bayesian
null hypothesis testing, along with different examples, see
Kruschke (2010a).
The instructor
John Kruschke has taught introductory Bayesian statistics
to graduate students for several years (and traditional statistics and mathematical modeling for over 20 years). He is
five-time winner of Teaching Excellence Recognition Awards
from Indiana University, where he is Professor of Psychological and Brain Sciences, and Adjunct Professor of Statistics. He has written an introductory textbook on Bayesian
data analysis (Kruschke, 2010b); see also the articles linked
above. His research interests include models of attention in
learning, which he has developed in both connectionist and
Bayesian formalisms. He received a Troland Research Award
from the National Academy of Sciences. He chaired the Cognitive Science Conference in 1992.
References
Kruschke, J. K. (2010a). Bayesian data analysis. Wiley Interdisciplinary Reviews: Cognitive Science. (Early view
available online.)
Kruschke, J. K. (2010b). Doing Bayesian data analysis: A
tutorial with R and BUGS. New York: Academic Press /
Elsevier Science. (To appear, November)
Kruschke, J. K. (2010c). What to believe: Bayesian methods
for data analysis. Trends in Cognitive Sciences. (In press)