Summer Institute in Statistical Genetics
Module 8: Bayesian Statistics for Genetics
Instructors: Jon Wakefield and Ken Rice

Please complete the post-survey - thank you!

This page, updated throughout the course, will feature slides from our sessions, and examples for you to try.

Prior to the module, please install up-to-date versions of R and RStudio on the laptop you will use during the summer institute. Both are free.

Other software that will be useful, but only used in parts of the module:
  • Stan: Windows users first need the Rtools toolchain, Mac users may need the toolchain and corresponding tools. Then install R's rstan package.
  • JAGS: Install JAGS itself [Windows, Mac], then install R's rjags package
  • INLA: To get the INLA package for R, follow the non-standard procedure here
  • WinBUGS: you will need WinBUGS and the R2WinBUGS R package. If you don't remember where to point and click, watch the (unrated) WinBUGS the Movie. Note making WinBUGS work on a Mac requires a Windows emulator such as HomeBrew, and you may prefer just to use JAGS instead.
Slides and exercises

Script files are posted following each session; these will contain our R code for the exercises. To make them work on your computer, remember to modify file names and locations appropriately. Also note that many different 'correct' solutions are possible. All times/dates are Pacfic, i.e. Seattle time.

The module has 10 sessions, each of 80 minutes. The standard format for a session is approximately:

  • 50 minutes of pre-recorded lecture material
  • 20 minutes of code demonstrations and exercises for you to try, with small-group "breakout" Zoom sessions available, attended by other class participants, and Teaching Assistants. Please help each other out!
  • 10 minute discussion of exercises, where the instructors will present possible solutions and answer questions

Sessions will all be held in our Zoom Room. Please also join the module's Slack channel, where you can ask questions and see real-time updates from the instructors and TAs.


Slides and code used in-class
Monday, July 20th
Time Topic Lecture Exercises/Discussion
8:00am-9:20am 0/1. Introductions, motivation for Bayes Slides0 [.pdf] Slides1 [.pdf], ZoomRec Exercises Key [.pdf] ZoomRec
9:40am-11:00am 2. Binomial sampling, part 1 Slides [.pdf], ZoomRec Demo and exercises [.Rmd, .pdf] Key [.R]
11:30am-12:50pm 3. Binomial sampling, part 2 Slides [.pdf], ZoomRec Demo and exercises [.Rmd, .pdf] Key [.R]
1:10pm-2:30pm 4. Linear models Slides [.pdf], video Exercises Script from demo[.R] Key [.pdf] ZoomRec
Tuesday, July 21st
Time Topic Lecture Exercises/Discussion
8:00am-9:20am 5. Multinomial Samples Slides [.pdf], ZoomRec Demo and exercises [.Rmd, .pdf], Stan file #1 #2 Key [.R]
9:40am-11:00am 6. Model selection and averaging Slides [.pdf], Code [.R] ZoomRec Exercises Key [.pdf] ZoomRec
11:30am-12:50pm 7. Generalized Linear Models Slides [.pdf], prostmat.csv, prostz.txt ZoomRec Demo and exercises [.Rmd, .pdf] Key [.R]
1:10pm-2:30pm 8. Meta-analysis Slides [.pdf], ZoomRec Exercises Script file [.R] Key [.pdf] ZoomRec
Wednesday, July 22nd
Time Topic Lecture Exercises/Discussion
8:00am-9:20am 9. Testing and Multiple Testing Slides [.pdf], prostmat.csv, prostz.txt, ZoomRec Demo [.Rmd, .pdf] no exercises for this session
9:40am-11:00am 10. Software examples Slides [.pdf], ZoomRec See demo resources below

Resources for Session 10: most of the examples run the HWE example - each example is self-contained

Datasets
  • ASAgene.txt: Data for Session 2 and 3
  • diagen_bma: Data and posterior simulations for Session 6 - load into an R session with load()
  • yX_FTO: Copy of the FTO data, for Session 6 - load into an R session with load()

Other resources

Some recommended books;