A practical guide to linear mixed effect models in Rstudio

In this episode of the Academic Crisis Line, Stacey Humphries and I gave a practical introduction to linear mixed-effects models. We talked about the background and key concepts about LMEMs, focused around 5 key questions that people often have when starting to encounter LMEMs for the first time.

  1. Why is a LMEM better than an ANOVA?
  2. What are fixed- and random-effects?
  3. What is the difference between a random intercept and a random slope?
  4. Should I include random slopes in my model?
  5. How can I tell if my model predictors significantly affect my dependent variable?

For answers to all these questions and more, check out the video! We also briefly walked through some practical aspects of running these analyses in R, but unfortunately the stream died at this point. We tried to re-record the parts that were lost, so this is annoyingly split over 3 videos. We hope it is useful nonetheless.

Video links:

Part 1:


Part 2:

Part 3:


We mentioned a lot of different papers and links in the video which are listed here for your convenience, along with a few others you might find interesting:

You can find the visualisations of random intercepts and random slopes that we walked through here: http://mfviz.com/hierarchical-models/

Bodo Winter put together some fantastic tutorial for LMEMs:

Clark (1973) The language-as-fixed-effect-fallacy: http://www.sciencedirect.com/science/article/pii/S0022537173800143

Baayen et al. (2008) Mixed-effects modeling with crossed random effects for subjects and items http://jakewestfall.org/misc/BDB2008.pdf

Barr et al. (2013) Random effects structure for confirmatory hypothesis testing: Keep it maximal https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3881361/

Bates et al. (2015) Parsimonious mixed models https://arxiv.org/pdf/1506.04967.pdf

Matuschek et al. (2017) Balancing Type I error and power in linear mixed models http://www.sciencedirect.com/science/article/pii/S0749596X17300013

Baayen et al. (2017) The cave of shadows: Addressing the human factor with generalized additive mixed models http://www.sciencedirect.com/science/article/pii/S0749596X16302467

Luke (2017) Evaluating significance in linear mixed-effects models in R https://link.springer.com/article/10.3758/s13428-016-0809-y

Summary of Luke (2017) by Richard Morey: https://featuredcontent.psychonomic.org/putting-ps-into-lmer-mixed-model-regression-and-statistical-significance/

Brysbaert (2018) Power analysis and effect size in mixed effects models: A tutorial https://psyarxiv.com/fahxc




If you have any questions that we didn’t cover, please feel free to tweet us (@_SHumphries, @FranHartung, @Ph_Dial), or email us (hstace[AT]pennmedicine.upenn.edu, fhartung[AT]pennmedicine.upenn.edu).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s