Bayesian statistics, simulation and software
Module 01 (Wednesday 4 Dec 8:45 - 12:00)
Topics: Basic probability.
Module 02 (Wednesday 4 Dec 12:30 - 15:45)
Topics: Introduction to the R software package.
- Overview of R and RStudio, and setting up an RStudio project. There is no material for this overview where you are expected to follow along and set things up.
- Introduction to R commands etc. We go through the material in R-demo.pdf in a live programming session. (Correspondig script: R-demo.R)
- Introduction to Rmarkdown documents. As an example we will look at the file exercises02.Rmd which was used to generate the exercises for module 2. Solutions are provided in pdf and Rmd formats.
Module 03 (Thursday 5 Dec 8:45 - 12:00)
Topics: Bayesian principle, the binomial model, conjugate priors.
Please read sections 1-2.2 in the notes A brief introduction to Bayesian inference.
- We start by going through this material about the binomial model mainly covering likelihood inference and only briefly introducing Bayesian inference. The exercises for this part are here, and you may use the Rmarkdown file as a template for answering the exercises. Solutions are provided in pdf and Rmd formats.
- We then go through the main slides with more details about the binomial model in the Bayesian setting and more. For this part solve exercises 1, 2, and 3 in the notes A brief introduction to Bayesian inference. (If you don't manage to solve all 3 exercises, you may continue in the afternoon.) Here you find the solutions.
Module 04 (Thursday 5 Dec 12:30 - 15:45)
Topics: The Gaussian model, conjugate and improper priors.
Please read sections 2.3-2.6 in the notes A brief introduction to Bayesian inference.
Module 05 (Friday 6 Dec 8:45 - 12:00)
Topics: Introduction to simulation based inference.
- We first go through the main slides.
- Then the supplementary material contains a lot of the details of the implementation in R.
- The first exercise concerns this R implementation. Solutions are provided in pdf and Rmd formats.
- Finally, the remaining time is devoted to this mark-and-recapture exercise. This frequentist analysis mainly uses material from lecture 3, while we at a later stage will conduct a Bayesian analysis. It may be convenient to download this Rmarkdown source file for the exercise. Solution is provided in pdf and Rmd formats. Also a comment about the likelihood is available
Module 06 (Friday 6 Dec 12:30 - 15:45)
Topics: The Gibbs sampler.
Read about Gibbs sampling, see Section 8 in "A short diversion into...". A minor point: Notice that the gamma distribution is parameterised differently from what we have done so far in this course.
Module 07 (Monday 9 Dec 8:45 - 12:00)
Topics: More Markov chain Monte Carlo methods.
- We first go through the supplementary material which concerns rejection sampling and practical aspects in R.
- Then there is time to work on exercises about rejection sampling. Solutions are provided in pdf and Rmd formats.
- Then we go through the main slides.
- Finally, there is time to work on this exercise. Solutions are provided in pdf and Rmd formats.
Module 08 (Monday 9 Dec 12:30 - 15:45)
Topics: More MCMC: Invariant density, irreducibility, Metropolis-Hastings algorithm.
Module 09 (Tuesday 10 Dec 8:45 - 12:00)
Topics: More MCMC: Metropolis-Hastings algorithm, burn-in, tuning.
Module 10 (Tuesday 10 Dec 12:30 - 15:45)
Topics: Bayesian prediction and model checking.
Module 11 (Wednesday 11 Dec 8:45 - 12:00)
Topics: A mixture model and JAGS.
Module 12 (Wednesday 11 Dec 12:30 - 15:45)
The final module is devoted to the hand-in exercise that must be completed to obtain credit for the course (see the front page for the hand-in date).