You can access the source code for the book from here.

Overview and motivation for this course

In recent years, Bayesian methods have come to be widely adopted in all areas
of science. This is in large part due to the development of sophisticated
software for probabilisic programming; a recent example is the astonishing
computing capability afforded by the language Stan (mc-stan.org). However, the underlying theory needed to
use this software sensibly is often inaccessible because end-users don't
necessarily have the statistical and mathematical background to read the
primary textbooks (such as Gelman et al's classic Bayesian data analysis, 3rd
edition). In this course, we seek to cover this gap, by providing a relatively
accessible and technically non-demanding introduction to the basic workflow for
fitting different kinds of linear models using Stan. To illustrate the
capability of Bayesian modeling, we will use the R package RStan and a powerful
front-end R package for Stan called brms.

Prerequisites

You must have a functioning computer to do this course.
We also assume familiarity with R. Participants will benefit most if they have
previously fit linear models and linear mixed models (using lme4) in R, in any
scientific domain within linguistics and psychology. No knowledge of calculus or
linear algebra is assumed (but will be helpful to know), but basic school level
mathematics knowledge is assumed (this will be quickly revisited in class).

Please install the following software before watching the videos

We will be using the software R, and RStudio, so make sure you install these on
your computer. You should also install the R package rstan;
the R package brms.
Please follow the installation instructions carefully.
Install the library bcogsci from here.

Outcomes

After completing this course, the participant will have become familiar with the
foundations of Bayesian inference using brms, and will be able to fit a range of
multiple regression models and hierarchical models, for normally distributed
data, and for lognormal and binomially distributed data. They will know how to
calibrate their models using prior and posterior predictive checks.

Solutions to exercises are not publicly available; they will only be provided to participants. Tutorial articles
Here are some articles that provide background reading, and cover some
additional topics that we will skip:

Some example articles from our lab and other groups that use Bayesian methods
A frequently asked question is: how to summarize the results of a Bayesian
analysis? Here are some examples of articles we have published using Bayesian
data analysis. Our presentation of results is continuously evolving; there is no
fixed answer to the question, how should I display my results? Use your
judgement. The most important thing you can do to facilitate understanding of
your work is to be open and transparent about your analyses. This means
releasing all data and code with the published paper. We will be providing some
guidelines on how to do this, in the summer school course.