Please note: This course will be taught in hybrid mode. Hybrid delivery of courses will include synchronous live sessions during which on campus and online students will be taught simultaneously.

Richard Morey is a Reader in the School of Psychology at Cardiff University. In 2008, he earned a PhD in Cognition and Neuroscience and a Masters degree in Statistics from the University of Missouri. He is the author of over 50 articles and book chapters, and in 2017 he was awarded the Federation of Associations in Behavioural and Brain Sciences Early Career Impact award on behalf of the Psychonomic Society. His work spans cognitive science, where he develops and critiques statistical models of cognitive phenomena; statistics, where he is interested in the philosophy of statistical inference and the development of new statistical tools for research use; and the practical side of science, where he is interested in increasing openness in scientific methodology.

Course content
In recent decades, there has been an explosion of interest in Bayesian methodologies in the sciences. There are several reasons for this recent interest: first, Bayesian methods often yield easier-to-interpret answers to statistical questions than classical methods; and second, Bayesian methods are applicable in situations where classical methods are difficult or impossible to implement. In this course, you will learn the basics of practical Bayesian data analysis.

Course objectives
The course will begin with the theory behind Bayesian data analysis, and move toward simple, common models in the social sciences, like t tests, ANOVA, and regression. From there, we will learn about more complicated models and how these may be fit to the data. Special attention will be given to Markov Chain Monte Carlo (MCMC) methods, which give Bayesian methods their immense flexibility and power. Using software, the power of MCMC methods are available to researchers who are not specialists in Bayesian methods. This class will give you the tools to fit a wide variety of models easily, though the use of the JAGS and stan software.

Course Prerequisites
A working knowledge of probability theory is assumed for this class. In addition, knowledge of common statistical models used in the social sciences is necessary , including t tests, ANOVA, and regression. A familiarity with more complicated models such as logistic regression will also prove helpful. Finally, a basic knowledge of the R statistical environment, which will be extensively used in the course, will be very helpful. For many methods, we will use JAGS or stan to fit models.

Background reading
Gelman, Carlin, Rubin, and Stern’s classic Bayesian Data Analysis,
Jackman, S. Bayesian Analysis for the Social Sciences (Wiley, 2009)
Lee. Introductory Bayesian Statistics.

Required text – this text will be provided by ESS:

McElreath, R. Statistical Rethinking, 2nd Edition (CRC Press, 2020)

Background knowledge required

Statistics

OLS = moderate

Computer Background

R = moderate

Maths

Calculus = elementary

Linear Regression = moderate

Course Outline 

The first week of the course introduces students to the philosophy behind Bayesian statistics with applications to common models in the social sciences, like t tests, ANOVA, and regression. The foundational ideas in the first week are built upon in the second week, where students learn about more complicated (multilevel) Bayesian models. Special attention will be paid to Markov Chain Monte Carlo (MCMC) methods, which give Bayesian methods their flexibility and power. Using free software (e.g. JAGS, stan) with R, MCMC methods are practical for researchers who are not specialists in Bayesian methods.

Learning objectives

After taking this course, students should be able to:

  • Describe the difference between Bayesian and frequentist statistics
  • Describe the roles of the prior, likelihood, and posterior in a Bayesian data analysis
  • Build a model and obtain posterior inferences for relevant parameters
  • Interpret the output of a MCMC sampler
  • Diagnose problems with MCMC samplers

Software

Text and readings

Each day except the first there will be two sets of readings assigned: one covering the theory of Bayesian inference, and one reading covering the practice of Bayesian inference. Most of the theoretical readings are taken from the text assigned for the course.

The text for the course is McElreath (2015), “Statistical Rethinking” (ISBN: 9781482253443).

Day 1:

Course overview and introduction

Why Bayes?

Getting set up

Day 2:

Modeling philosophy

Bayesian statistics

Summarizing posteriors McElreath, Ch. 1-3 (2nd ed)

Gelman (2012): Ethics and the statistical use of prior information (http://www.stat.columbia.edu/~gelman/research/published/ChanceEthics5.pdf)  

Day 3:

Linear models  

Multivariable linear models

Fitting a simple linear model

McElreath, Ch. 4-5 (2nd ed)

Day 4

Parameters and data

Overparametrization and regularization  

Full two group analysis with inference    

McElreath, Ch. 7 (2nd ed)         

Gelman & Shalizi, 2013, “Philosophy and the Practice of Statistics” ((http://www.stat.columbia.edu/~gelman/research/published/philosophy.pdf))      

Day 5

Interactions I    

Interactions II   

A linear model analysis, with JAGS/stan code    

McElreath, Ch. 8 (2nd ed)         

Day 6:

Markov Chain Monte Carlo        

Entropy and information Working with MCMC chains

McElreath, Ch. 9-10 (2nd ed)    

Hamra et al. (2013): Markov Chain Monte Carlo: an introduction for epidemiologists (http://ije.oxfordjournals.org/content /42/2/627.full.pdf+html) 

Day 7

Categorical outcomes

Count outcomes

MCMC chain diagnostics          

McElreath, Ch. 11 (2nd ed)       

Hartig (2011): MCMC chain analysis and convergence diagnostics with coda in R (https://theoreticalecology.wordpress.com/2011/12/09/mcmc-chain-analysis-andconvergence-diagnostics-with-coda-in-r/)         Please note: Install the shinystan (https://mcstan.org/users/interfaces/shinystan) package.