*Time*: 14—17 June (Mon-Thu) and 20—23 June (Sun—Wed), 2010*Place*: Ahlmanin kartano, Hallilankatu 24, Tampere http://www.ahlman.fi/*Lecturer*: Petri Koistinen, Dept. of Mathematics and Statistics, University of Helsinki,*Sponsor*: FDPSS, The Finnish Doctoral Programme in Stochastics and Statistics (formerly known as FGSS, The Finnish Graduate School in Stochastics and Statistics).

- schedule.txt
- 3 hours of lectures and 2 hours of computer demonstrations each day
- breakfast is at 8:00-9:00 (no breakfast on 14 June or 20 June)
- lunch is at 12:00-13:00.
- coffee will be available at 16:00-16:30
- on 14 June and 20 June (the first days of the respective periods) the lectures will start at 11:00; on 17 June and 23 June (the last days of the respective periods) the program will finish at 15:00.

This course is intended mainly for Ph.D students, but also master's level students interested in the course are welcome.

The FGSS graduate school payes the travel expenses, accomodation and breakfasts and lunches during the course for the FGSS students. For others the course fee is 313 euros (check the details with Ari-Pekka Perkkiö) and the fee includes accomodation at Ahlmanin kartano, breakfasts and lunches.

If you are interested in participating in the course but are not student of FGSS, you can ask for FGSS funding from Ari-Pekka Perkkiö, <aperkkio at math dot hut dot fi>

In order to register for the course, send Ari-Pekka Perkkiö (see email address above) the following information, no later than on 7 May 2010.

- Name:
- University and department:
- Ph.D./Master's degree supervisor:

The ideal student coming to this course has the following prerequisites.

- Working knowledge of probability, including some familiarity with multivariate distributions. Measure theory is not needed.
- Working knowledge of multivariate differential and integral calculus (partial derivatives, multiple integrals).
- Working knowledge of linear algebra.
- Has available a laptop computer, is able to use it and install software on it, and is willing to take it to the course.

However, I don't really expect that everybody will meet all of these expectations.

A student who successfully completes the practical work will get a certificate where we recommend that the course should be accepted as being worth 6 cu.

An exception is formed by those students who have completed the course Computational Statistics (Laskennallinen tilastotiede) at University of Helsinki, since there is significant overlap with that course. Those students cannot get the 6 cu from this course.

However, the credit units will be granted by the participant's own university. Therefore each student should negotiate with her or his thesis adviser on the question whether there are problems with this arrangement.

The lectures give an overview of Monte Carlo methods which are useful especially for Bayesian inference. The planned topics are

- Methods for drawing independent samples from probability distributions.
- Classical Monte Carlo integration, and methods for variance reduction.
- Basic ideas of Bayesian inference.
- Approximating the posterior with numerical integration and Laplace expansions.
- MCMC methods: Metropolis—Hastings algorithm and Gibbs sampling.
- Auxiliary variable methods in MCMC.
- Multi-model inference.
- MCMC theory.

The computer demos will include an introduction to R and an introduction to WinBUGS/OpenBUGS.

However, most of the time we will discuss assignments connected with the theory.

In order to get the credits, the participants should complete the practical work assigned during the course.

- mcmbc10.pdf — lecture notes which cover the needed theory.
- app.pdf Appendix A and B of the lecture notes.

- rintro.r — rudiments of R language, reading and writing data, graphics, simulation (and more).
- appb.r — code examples from appendix B.
- mcmc-examples.r — examples of MCMC samplers coded in R.

- bugs-intro.txt — introduction to WinBUGS/OpenBUGS
- normalmodel.txt, normaldata.txt, normalinits.txt
- lin-mod1.txt simple linear regression; simulating the posterior predictive using the NA trick
- lin-mod2.txt simple linear regression; simulating the posterior predictive without using the NA trick.
- runnormal-R2WinBUGS.r, runnormal-brugs.r examples of running WinBUGS and OpenBUGS from R on the following simple model: normalmodel.txt.
- model-sel.txt and example where we set up a model selection problem using its product space (re)formulation.
- freeze.txt a minimal example which freezes OpenBUGS.

- A—R example form the lecture notes (two different approaches): a-r-example.r
- A one-dimensional RWM algorithm: rwm.r
- exercises.txt exercises with solutions to all problems.

Procedure:

- pick one topic
- implement the inference
- write a report which explains the problem, your solution method and your results,
- send the report to the lecturer (petri dot koistinen at helsinki dot fi).

Deadline for the report: end of November, 2010.

Below are some suggestions for topics. The intention is that it should be possible to finish the project (from initial conception to a final report) within one week of concentrated work. If you come up with a more interesting topic, then feel free to suggest it.

- gamma.pdf — trying different M—H samplers for gamma parameters,
- challenger.pdf — analyzing space shuttle Challenger data using a Baysian approach,
- regr-mmi1.pdf — multimodel inference for a simple regression model using these data regrdata.txt

We will use R and WinBUGS/OpenBUGS during the course.

**Every participant should install these programs on their
computers before the course starts and bring the computer to the course.**

R is a popular software environment for statistical computing and graphics. R is free, open source, and has lots of documentation available online. It is available for Windows, Mac OS X, and Linux. It can be downloaded from

We use (at least) the following packages

- R2WinBUGS, BRugs, coda

In the Windows version of R these can be installed from the menus. Try

Packages->Install package(s)...

select a location near you (e.g. Denmark or Sweden) and then select the name of the package you want from the list.

BUGS is a computing environment for doing Bayesian analysis with the aid of MCMC methods. There are two main versions available, namely WinBUGS and OpenBUGS. They can be installed by following the advice on the respective homepages:

Both of these programs are free, rather similar, and easy to install on a Windows computer according to the instructions.

If you have a Linux or a Macintosh computer, then it should be possible to run the Windows version of OpenBUGS using wine (which is a Windows emulator that you should install first), see the OpenBUGS homepage for more advice.

It may also be possible to run OpenBUGS directly under Linux, but then you don't get a graphical user interface but are limited to using scripts. In that case it may be possible to run OpenBUGS through R.

The manuals or R can be read online.

There is lots of free documentation on R available through the subpage of R project homepage titled Contributed Documentation.

If you need an introduction to R in book form, I suggest one of the following

- P. Dalgaard.
*Introductory Statistics with R*, 2nd ed., Springer, 2008. - J. Maindonald and J. Braun.
*Data Analysis and Graphics Using R: An Example-based Approach*, Cambridge University Press, 2003. - J. Adler.
*R in a Nutshell: A Desktop Quick Reference*, O'Reilly, 2009.

Introductory books on Monte Carlo methods in the context of Bayesian inference:

- J. Albert.
*Bayesian Computation with R*, Springer, 2007. - W. M. Bolstad.
*Understanding Computational Bayesian Statistics*, Wiley, 2010. - C. P. Robert and G. Casella.
*Introducing Monte Carlo Methods with R*, Springer, 2010.

Books primarily on Bayesian statistics, which also discuss modern Bayesian computation:

- A. Gelman, J. B. Carlin, H. S. Stern and D. B. Rubin,
*Bayesian Data Analysis*, 2nd ed., Chapmann & Hall/CRC, 2004. - A. O'Hagan and J. Forster,
*Bayesian Inference: Kendall's Advanced Theory of Statistics, Volume 2B*, 2nd ed., Arnold 2004. - I. Ntzoufras.
*Bayesian Modeling Using WinBUGS*, Wiley, 2009.

A selection of more advanced books on Monte Carlo and/or Bayesian computation:

- D. Gamerman and H. F. Lopes,
*Markov Chain Monte Carlo: Stochastic simulation for Bayesian inference*, 2nd ed., Chapman & Hall/CRC, 2006. - C. P. Robert and G. Casella,
*Monte Carlo statistical methods*, 2nd ed., Springer 2004. - M.-H. Chen and Q.-M. Shao and J. G. Ibrahim,
*Monte Carlo methods in Bayesian computation*, Springer 2000. - S. Asmussen and P. W. Glynn,
*Stochastic simulation: algorithms and analysis*, Springer 2007. - R. Y. Rubinstein and D. P. Kroese,
*Simulation and the Monte Carlo Method*, 2nd ed., Wiley, 2008.

Last updated 2011-02-01 14:51

Petri Koistinen

petri.koistinen 'at' helsinki.fi