Applied Linear Mixed Models


In this block-course we developed Generalized Linear Models and Mixed Linear Models from scratch. The idea is to introduce the linear model and all its encompasing tests as one coherent framework (i.e. t-test, ANOVA, ANCOVA, repeated measures ANOVA) and then continue with GLMs and LMMs. The mornings were two to three 1h lectures in the afternoon a 2.5-3h exercise session (previous edition was withwith Basil Wahn)

Lecture Slides

All slides are generated in R, thus all the plots can be easily rebuild and customized if necessary.

You can find the Rpresentation source code (including code to generate 90% of graphs) for GLM here and for LMM here.


Logistic regression. Here we use the cowles data from John Fox’s Applied Regression Analysis Book. We predict whether a student will volunteer in a study or not based on sex, extraversion and neuroticism. An interaction is modeled and interpreted as well.

Mixed Linear model. Here we use data from one of my studies to build a simple linear mixed model. We will look at parameter transformations, assumption tests (which fail in this case) and log-log interactions. We also have models that do not converge, model comparisons using likelihood-ratio tests. Finally we check whether multiple random variables are necessary.