Statistics for Psychologists with R: Mixed Modeling

Dominique Makowski

This course is supported by the École de Neuropsychologie group.

About the course

Course Status
Length ≈ ...min

This course was crafted by psychologists, neuropsychologists and neuroscientists for psychologists, neuropsychologists and neuroscientists.

Why We Should All Use the Mixed Modeling Framework


Magezi (2015)

Despite this preponderance of categorical data, the use of statistical analyses that have long been known to be questionable for caterogical data analysis (such as analysis of variance, ANOVA) is still commonplace in our field. While there are powerful modern methods designed for caterogical data analysis [...], they are considered too complicated or simply unnecessary. --Jaeger (2008), p. 435

Traditional approaches to random effects modeling suffer multiple drawbacks which can be eliminated by adopting mixed effect linear models. These drawbacks include (a) deficiencies in statistical power related to the problems posed by repeated observations, (b) the lack of a flexible method of dealing with missing data, (c) disparate methods for treating continuous and categorical responses, as well as (d) unprincipled methods of modeling heteroskedasticity and non-spherical error variance (for either participants or items). Methods for estimating linear mixed effect models have addressed each of these concerns, and offer a better approach than univariate ANOVA or ordinary least squares regression. --Baayen (2008), p. 391

These mixed effects models offer many additional advantages over both traditional repeated-measures ANOVA and quasi-F statistics. These include the ability to handle incomplete and unbalanced data, the ability to easily accommodate continuous as well as categorical predictors, avoidance of information loss due to prior averaging over stimuli or participants, principled unbiased handling of incomplete and/or outlying cases... --Judd (2012), p. 391


  • LM
  • LME
  • LMX
  • Hierarchical
  • LMER


[They] show that LMEMs generalize best when they include the maximal random effects structure justified by the design. Barr (2013)



Our core contribution is to provide a quantitative empirical evaluation of the performance of Linear Mixed Effects and competing alternatives popularly used in prior longitudinal structural MRI studies, namely repeated measures ANOVA [...] Our results suggest that the Linear Mixed Effects approach offers superior statistical power in detecting longitudinal group differences. --Bernal-Rusiel (2012)



lsmeans::lsmeans(fit, pairwise~Intensity)