WinBUGS OpenBUGS with applications, spring 2011
Lecturer
Jukka Ranta
Scope
5 cu.
Type
Kurssilla perehdytään WinBUGS/OpenBUGS ohjelmistoihin, jotka edustavat laajalti käytössä olevia bayesläisen tilastotieteen laskennallisia työkaluja. Jonkin verran käytetään myös R-ohjelmaa. Kurssilla keskitytään sovellusesimerkkien avulla aineistojen analysoimiseen ja mallintamiseen, datan muokkauksesta tulosten tulkintaan ja mallin arviointiin. Keskeisenä työvälineenä on WinBUGS-ohjelmointikieli ja sen avulla suoritettava simulointi ja simulointitulosten arviointi. Tavoitteena on oppia miten Bayes-malleja määritellään ja käytetään syklittömien suunnattujen graafien ja BUGSin formaalin syntaksin avulla, simulaatiotulosten analysointi sekä ohjelmien tiettyjen erikoisominaisuuksien hyödyntäminen. Bayes-päättelyn/tilastotieteen perusteet oletetaan esitietoina.
In this course, we will explore WinBUGS/OpenBUGS software which are widely used for computation in Bayesian statistics. Also, statistical software R will be briefly visited. The focus is mainly on analysing and modeling application examples, from formatting of the data to interpreting the results and model assessment. Central tool for this is the WinBUGS-programming language and assessing the simulations thus produced. The goal is to learn how to define and use Bayesian models with acyclic graphs using BUGS syntax, to analyse simulation results obtained, and to get familiar with some special features of the software. Some knowledge of the basic principles of Bayesian inference/statistics is assumed.
Prerequisites
Basic understanding of the elements of Bayesian (and other) statistics, and probability calculus with random variables. Some familiarity with typical univariate and simple multivariate distributions, concepts such as conditional, joint and marginal distributions, and some idea of Monte Carlo simulation as an approximation method. Interest for analysing data with Bayesian computational methods. Some theory will be briefly revisited in the introduction, though.
Lectures
III period
Monday 16-18, C124, Thursday 16-18 B120
Exams
9.3. (General examination day). The exam questions are closely related to possible application models implemented in BUGS-model-language and explanations of some frequently used concepts in bayesian models done with BUGS. A brief collection of
Second exam: 24.3. (General examination day).
Remember also to complete the written exercise by 1.4. It is 25% of the max points. (10+30).
Third exam: 17.5. (General examination day again).
here.
Lecture material
List of probability distributions from Gelman et al:
. The parametrizations according to this list will be used in notations, unless WinBUGS requires differently.Here is some bayesian background reading: 'Methods festival'.
Likewise, you may also study the lecture notes of Jukka Corander about bayesian theory and applications (spring 2010). Corander2010
Lecture notes,
Basics of BUGS:
BUGS and linear models: , softdrink example , . Note about .
BUGS and ANOVA: .
BUGS and GLM: .
LM, ANOVA, ANCOVA, GLM in BUGS: .
BUGS and hierarchical models: . New figures added + complete R code for the example + mixture model example added. General .
A paper on variance component in hierarchical models.
Model assessment: .
Customed BUGS functions and distributions: . An of a new function.
Some corrections and additions have been made to lecture notes, up to the last week (week 9). So, check that you have the latest.
Possible example problems for the homework project are now
Registration
Did you forget to register? What to do.
Exercise groups
Starting 28.1. Friday.
The section numbers refer to the sections in part1.pdf and part2.pdf. The exercises are just for practice. Points (max 10) are from the single 'project report' described above. Note that some probability distributions can have alternative parametrizations in the literature. In the notes and in the exercises, the parametrization is as shown in the list above, taken from Gelman et al book 'Bayesian data analysis'.
Exercise 1:
Section 2.1: exercise 7, but consider the situation with n variables. Discuss the advantages of conditional independence.
+Section 4.6: exercises 2,7,8.
+Section 6.6: exercise 5.
+Section 7.8: exercises 3,7,11,12.
Solutions .
Exercise 2:
solutions .
Exercise 3:
solutions . Softdrink example , .
Exercise 4:
solutions .
Exercise 5:
solutions .
Exercise 6: . If you are planning to come to the last session on Friday, please email me or Ali Thu evening latest.
Group | Day | Time | Place | Instructor |
---|---|---|---|---|
1. | Friday | 8-10 | C128 computer class |