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)
All slides are generated in R, thus all the plots can be easily rebuild and customized if necessary.
Linear Modeling We introduce linear modeling as an overarching theme. We use dummy codings, Standard Errors, Confidence Intervals, Bootstrapping, the concept of “there exists only one test”, interactions, and some philosophical aspects
Generalized Linear Models We discussed Logistic+Poisson regression GLM. A focus is put on motivation and interpretation. We reconcile all members of the GLM family and put special focus on the variance / mean assumptions
Linear Mixed Models We discussed repeated measures designs (within-subject) and move from there to LMMs. We discuss implementation, interpretation, assumption checks. Convergence problems are discussed. Random Coefficients (Intercept, Slopes, Correlations) and finally multiple random variables e.g. subjects and items.
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.