Week 13 - Mixed/Multilevel Models

When the Same Person Shows Up More Than Once

Every model so far has assumed each row is a different, independent person. This week the rows come in clusters: three waves from the same kid, ten days from the same sleepy participant. We’ll reshape wide data to long, see why lm() gets the standard errors wrong when rows aren’t independent, and fit our first mixed model with lmer(): random intercepts, the ICC, random slopes, and the difference between a between-person and a within-person effect.

The lecture and activity are short so that most of class is M3 work time.

ImportantThis week

πŸ’Ύ Class Check 5 at the start of class (20 min, on myCourses). Covers Weeks 11–12: missing data, model building, logistic regression.

πŸ“‚ M3 is due Monday 11/30. Bring your project to class.

Prepare

Slides

πŸ’» Mixed/Multilevel Models

Data

ASAP Study (.csv): used in the lecture

The activity uses sleepstudy, which comes with lme4. Nothing to download.

In-Class Activity

πŸ““ How Much Does a Short Night Cost? 😴

Then: M3 work time.

For Next Time

πŸ¦ƒ No class Thursday 11/26 (Thanksgiving)

πŸ“‚ Final Project M3, due Monday 11/30

πŸ“–Chapter 18 - ST

πŸ” M4 Reproducibility swap, in class Thursday 12/3



Back to course schedule ⏎