Chapter 18. Mixed effects models

This current chapter introduces another type of effect: ‘random effects’. Mixed effects models, the subject of this chapter, combine ‘fixed’ and ‘random’ effects.

Although we have yet not used this terminology, all analyses of General Linear Models in previous chapters treated factors as what’s termed, a fixed effect.  This current chapter introduces another type of effect:  random effects.  Mixed effects models, the subject of this chapter, combine fixed and ‘random’ effects.

How do ‘fixed’ vs. ‘random’ effects differ, and why do the differences matter?  Our videos begin by addressing these questions.  Therefore, this introductory text focuses on how mixed effects models might help you.

We might incorporate a ‘random effect’ in our model for two general, non-exclusive purposes.  First, we might include a random effect to appropriately model sources of variance in our study; i.e., to match our statistical model to an experimental design.  For instance, if our experiment involved repeatedly measuring subjects, families, individuals within cages (etc), our analysis would suffer from pseudo-replication if we did not account for the non-independence of the repeated measurements.  We might resolve this issue by modelling an appropriate random effect (e.g. treat subject, family or cage as a random effect, as appropriate).  Similarly, if our experiment incorporates ‘blocks’, we might model ‘block’ as a random effect.

View the following article for details:

Document

 

Second, a random effect might directly address a biologist’s research interest.  For example the field of quantitative genetics routinely uses random effects to quantify (and account for) variance due to genetic and environmental causes; e.g., a researcher can use random effects to determine how much of a trait’s variance is due to genetic vs. environmental causes.  As a more specific example, random effects can quantify the extent and patterns of phenotypic plasticity in a population.

View example in New Phytologist:

Document

 

In the field of Neuroscience, Pastoll et al. (2020) used mixed effects models to determine the extent to which among-animal differences contribute to variability in properties of stellate cells:

Document

 

Note that these biological questions aim to estimate the amount of variation of some aspect of biology  (e.g. quantify genetic contributions to a phenotype).  This goal differs in some respects from studies that aim to test for differences in the mean value between groups.  Hence, ‘random effects’ provide a tool to address biological questions that ‘fixed effects’.  

Mixed effects models comprise a huge subject area; entire books discuss mixed effects models and their uses (we list some of these books, below).  At the moment, this chapter provides a brief introduction to mixed effects models; it will nevertheless prove very useful to many people using this resource.  We will delve deeper into mixed effects models in the future.

Before we get to the videos, I must add a cautionary note with respect to studies that measure subjects repeatedly over time.  Mixed effects models can be used to analyse such ‘longitudinal studies’.  However, appropriate analyses can require more sophisticated models than simply including ‘subject’ as a random effect (often the first instinct for many researchers).  For example, when measurements within subjects are more similar between points closer in time than between those more distant points in time, ‘autocorrelation’ can increase type 1 errors (i.e. false positive). 

Solutions do exist to resolve such issues, but require slightly more advanced use of mixed effect models.

See an example in PLoS Pathology:

Document

 

Therefore, we caution researchers who study time-series data to acquaint themselves with appropriate analyses, which we do not yet cover in this resource (e.g. see Fitzmaurice et al. ‘Applied longitudinal analysis’ in Recommended Reading).

Document
experimental data - tadpole (17.23 KB / XLSX)

The Powerpoint presentation below provides questions that review basic concepts from this chapter.  Note that the questions sometimes present more than one correct answer, and sometimes all the options are incorrect!  The point of these questions is to get you to think and to reinforce basic concepts from the videos.  You can find the answers to the questions in the ‘notes’ section beneath each slide.


Document