Workshop: Introduction to Doing Bayesian Data Analysis
Saturday, Oct. 22, 2011, 9:00am - 12:00noon
Stewart Center (STEW), room 214
1. Why you should attend the tutorial. (Notice that the
Bayesian analysis reveals many credible regression lines, for which
the slopes and intercepts trade off, instead of just one "best"
This workshop shows you how to do Bayesian data analysis,
hands on (with free software called R and BUGS).
The intended audience is grad students, faculty, and other researchers who want
a ground-floor introduction to Bayesian data analysis. No mathematical
expertise is presumed.
The perils of p values. (More reasons to go Bayesian are linked below. See also Figure 1.)
Bayes' rule, grid approximation, and R.
Markov chain Monte Carlo and BUGS. This does not involve any physical restraints or insects. Unfortunately, it also does not involve Monte Carlo.
Coffee break! Everything tastes better when it's Bayesian.
Bayesian comparison of means and Bayesian ANOVA with multiple comparisons. Bayesian comparison of means avoids fatal flaws in null hypothesis significance testing.
Strongly recommended textbook:Doing Bayesian Data Analysis: A Tutorial with R and BUGS. See some published reviews of the book here. Other endorsements and information about the book can be read here.
Bayesian data analysis is not Bayesian modeling of
cognition. Data analysis involves "generic" descriptive models
(such as linear regression) without any necessary interpretation as
cognitive computation. The rational way to estimate parameters in
descriptive models is Bayesian, regardless of whether or not Bayesian
models of mind are viable. The concepts and methods of Bayesian data
analysis transfer to other Bayesian models, including Bayesian models
Why go Bayesian?See Figure 1. But beyond that,
sciences from astronomy to zoology are changing from 20th-century
null-hypothesis significance testing to Bayesian data analysis.
An open letter explaining why it's time to go
An article* that explains a critical flaw
of p-values in null hypothesis significance testing, and two
different Bayesian approaches to assessing null values.
Kruschke, J. K. (2010). Bayesian data analysis. Wiley
Interdisciplinary Reviews: Cognitive Science, 1(5),
An article* that emphasizes advantages of
Bayesian data analysis and the fact that Bayesian data analysis is
appropriate regardless of the status of Bayesian models of cognition.
Kruschke, J. K. (2010). What to believe: Bayesian methods
for data analysis. Trends in Cognitive Sciences,
14(7), 293-300. (doi:10.1016/j.tics.2010.05.001)
An article* that explains two Bayesian methods to assess null values, and which one is typically more informative.
Kruschke, J. K. (2011). Bayesian assessment of null values via parameter estimation and model comparison. Perspectives on Psychological Science, 6(3), 299-312.
*Your click on this link constitutes your request to
the author for a personal copy of the article exclusively for
Who is the instructor?John
Kruschke 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; see also the articles linked above. His research
interests include the science of moral judgment, applications of Bayesian
methods to teaching and learning, and models of attention in learning,
which he has developed in both connectionist and Bayesian
formalisms. He received the Troland Research Award from the National
Academy of Sciences. He is action editor for the Journal of Mathematical Psychology, and is on the editorial boards of Psychological Review, the Journal of Experimental Psychology: General, among others.
Bringing a notebook computer?
You do not need to bring a notebook computer to the course. But you are invited to bring one, so that you can run the programs and see how their output corresponds with the presentation material.
If you want to bring a notebook computer to the course,
you must install the software listed below before arriving at the course, because there will not be time to do it during the tutorial.
One of the packages we'll be using requires the Windows
operating system (OS). If your machine can operate with Windows,
the tutorial materials may operate best that way. If you are using
Macintosh OS or Linux without the option to boot with Windows, please see the blog and search it with the term "Linux".
Install the free programming language R. Go to http://cran.r-project.org/. In the box labelled
"Download and Install R" click the "Windows" link. On the page
that appears, click the "base" link. The next page that appears
has the latest version of R as its top link. Click that link and
follow the installation instructions. Use the 32-bit version, not the
64-bit version. (Even if you are using MacOS or Linux, download the
32-bit Windows executable.)
Invoke R. (If you are using MacOS or Linux, invoke the Windows
version of R within WINE.) At the command line in the R console
window, type install.packages("BRugs") You must
include the quotes around "BRugs", and type "BR" in uppercase and
everything else in lowercase. You will be prompted to select an
internet repository; choose a site that is geographically near you.
Note: You must be using a recent version of R for the install.packages("BRugs") command to work
properly. Are you getting an error message that the package is not
available? If so, try this: In the R console window, click menu items
Packages > Select Repositories, and, in the resulting pop-up window,
make sure to select both CRAN and CRAN(extras), then click
okay. BRugs lives in CRAN(extras). Then try install.packages("BRugs")
again. Thanks to Uwe Ligges for these hints!
Copy the following data analysis program to your computer and
be sure that it runs. Right clickthis link and save the linked file on your
computer, using any file name with a ".R" extension. Then, invoke R,
and on the R console window click the menu items File >
Source R code... Browse to your saved file and
select it (and click Open or OK). The program should run in R and
produce a graph in a new window and some output text in the R console.
If the program does not run, please study all the previous steps
and be sure that each was successfully accomplished.