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 Article in Ecology Newman et al. (1997) (88.06 KB / (1997)) 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 Article in New Phytologist Arnold et al. (2018) (787.04 KB / (2018)) 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 Article in e-life Pastoll et al 2020 (4.25 MB / PDF) 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 Article in PLoS Pathology Pollitt et al. (2012) (383.31 KB / (2012)) 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).Emma Mather-Pike on Mixed effects modelsEmma Mather-Pike, a PhD student at the University of Edinburgh, shares her experience with mixed effects models. Document Transcript - emma pike (2.02 KB / TXT) Mixed Effects Models Part 1: Fixed vs Random effectsA discussion of differences between fixed and random effect, emphasizing differences with respect to their calculation Document Experimental data mixed effects models part 1 (4.23 MB / PPT) Document Transcript mixed effects models part 1 (26.6 KB / TXT) Mixed Effects Models Part 2: Interpreting fixed vs. random effectsHow does using fixed vs random effects influence the generality of our conclusions from a study? Document Experimental data mixed effects models part 2 (1.65 MB / PPT) Document Transcript mixed effects models part 2 (8.72 KB / TXT) Mixed Effects Models Part 3: Example TadpolesHere, we consider an experiment run by students in Neuroscience 3 at the University of Edinburgh. Unsurprisingly, we analyse it with mixed effects models.Please note that this video needs to be updated with respect to interpreting p-values: the video should be updated (i) to avoid comparing our p-value against 0.05, and (ii) to interpret the p-value for the effect of ‘Experiments’ (<2.2*10^-16) as strong evidence for an effect. Document Transcript - mixed effects models part 3 (29.08 KB / TXT) Power analysis for mixed effects modelsHow do we perform power analysis for mixed effects models? Several tools exist, view article in Behavior Research Methods: Document Article in Behavior Research Methods by Kumle et al. (2021) (1.64 MB / (2021)) We provide guidance to write your own simulations to perform power analysis. While writing your own simulations can take some time, it also ensures that you understand exactly what your power analysis is doing and the output that you receive. Moreover, writing your own simulations provides more options, such as conducting power analysis to estimate effect size to desired precision (rather than focusing on p-values). Please note that the guidance provided here builds upon that given in previous chapters. Therefore, we recommend that, before delving into the materials in the present chapter, you visit related materials in previous chapters (e.g. the chapter, Power Analysis; chapters that relate to your desired experimental design).Mixed effects models provide flexible tools to analyze a diversity of experimental designs. We cannot provide guidance for all possible experimental designs simultaneously. Instead, we provide guidance for a diversity of designs to provide the tools for you to recognize your own needs for your own experiment.Experimental design 11-Factor (fixed) experiment, ‘fully crossed’ with one random effect. This design imagines that each level of a random effect experiences all levels of a factor. For example, imagine that an experiment involved one factor (fixed effect) with three levels (‘treatments’), and many genotypes (the random effect; each genotype comprises one level of the random effect). This design would have each genotype experience all levels of the factor. Document Article by CJ: power random intercepts (269.59 KB / PDF) Practice problems and answers Document Experimental data chapter 18 Mixed effect models Questions (16.87 KB / DOCX) Document Experimental data chapter 18 Height stress data (6.67 KB / CSV) Document Experimental data chapter 18 Mystery data (1.77 KB / CSV) Document Experimental data chapter 18 Mixed effect models Answers (297.65 KB / PDF) Recommended ReadingFitzmaurice, Laird & Ware. Applied Longitudinal Analysis. Although this book aims to develop skills to analyse longitudinal data (i.e. studies that measure subjects repeatedly through time), it includes provides a great introduction to mixed effects models, including advanced use of mixed effects models. This book is available in two additions. I have read and used the first edition (it is great), but I expect the second edition is even better as it includes more materials and code for several statistical packages (including R).Ruxton & Colegrave. Experimental Design for the life sciences (4th Edition). Chapter ‘Withon-subject designs‘. This Chapter covers materials that we do not present in this website yet, that are relevant to design of within-subject (e.g. repeated measured) experimental designs. It includes much needed advice on advantages and disadvantages of within-subject designs.Whitlock & Schluter. The analysis of biological data. Chapter: Comparing means of more than two groups. This Chapter includes a very brief introduction to random vs. fixed effects, and discusses some uses of mixed effects models, e.g. estimating repeatability.Zuur et al. (2009). Mixed effects models and extensions in ecology with R. A great book that extensively treats the use of mixed effects models. Note that this book uses a different R library to analyse mixed effects models than we have used thus far in our chapter. But this should not deter interested readers. Document experimental data - tadpole (17.23 KB / XLSX) Review Quiz 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 experimental data quiz mixed effect models (3.39 MB / PPTX) This article was published on 2024-08-05