The textbook for the course is

- Madsen, H. and Thyregod, P. (2011) Introduction to General and Generalized Linear Models, Chapman and Hall/CRC, parts of chapter 5 and 6.

You may find it useful to also consult Faraway (2006) Extending the linear model with R, Chapman and Hall/CRC, chapter 2 and 8, which is a useful reference regarding more practical aspects of fitting mixed models. Pages 41-60 in Demidenko (2013) Mixed Models: Theory and Applications with R, Second Edition, give technical background on MLE and RMLE. Pages 9-49 in West et al (2014) Linear Mixed Models: A Practical Guide Using Statistical Software, Second Edition, also give background on linear mixed models and MLE.

The original reference regarding analysis of variance for orthogonal designs is Tjur, Tue (1984) Analysis of variance models in orthogonal designs, *International Statistical Review*, **52**, 33-65.

The course will be evaluated by active participation in solving exercises, presenting solutions of exercises, and handing in miniproject reports.

Some data sets used in the course. The orthodontic data set "Orthodont" is a part of the nlme R package.

During the course you will work on two mini-projects:

**First miniproject**: Disease for cucumbers -
ANOVA with random effects with data.

**Second miniproject:** Linear mixed
model with AR(1) errors. Along with the project description
comes some code
and more code.

**List of teaching sessions: **(*remember to refresh to get latest version of handouts*).

- Handouts (with exercises, updated 02.02.23). Read M & T page 157-168.
- Handouts (with exercises, updated 08.02.23). Read M & T page 169-171 and 175-182.
- Handouts (with exercises) (updated 08.02.2023). We first consider practical implementation of ML and REML for linear mixed models. Secondly we consider a geometric approach to one-way anova (sections 1-2 in the ANOVA notes). We also discuss the so-called hierarchical principle - try this R-code to get a better understanding of the importance of the hierarchical principle and the implications of different parametrizations.
- We continue with two-way ANOVA for balanced designs and some examples of data analyses (sections 3-4 in the ANOVA notes). Handouts (with exercises)(updated 27.02.23).
- We consider inference for anova-models Handouts (with exercises) (under construction) (section 5 in the ANOVA notes). Some R-code and data for the gene-expression example.
- We consider asymptotic inference for general linear mixed models. Handouts (updated 31.01.24). Some R-code for a simulation study and parametric bootstrap.
- Self-study. Groups work on and complete mini-projects.
- Self-study. Groups work on and complete mini-projects.
- Self-study. Groups work on and complete mini-projects.
- Self-study. Groups work on and complete mini-projects.
- Prediction. Handouts (updated 11.04.23). Read M & T page 171-174 and 182-186.
- Conditional independence, unnormalized densities (updated 17.04.2022) and Bayes statistics (updated 13.04.2023).
- Bayesian statistics continued. We conclude course by discussing a few case studies regarding mixed model analyses of randomized studies.
- Lectures on assorted topics for mixed
models. Bonus slides
and slides on autocorrelated noise

Last modified