Prussian Horse Kicks II: Mixed Effects Models

Last time we used a quirky dataset to get acquainted with Generalised Linear Models. If you recall, the dataset is a count of deaths by horse kick, where every year all the corps in the army had some non-negative integer number of deaths and we were predicting the mean of the distribution for each year. Being count data we had to adapt the linear model to use a Poisson distribution, which itself…