Modeling change within a person
Today let's look at what happens when you measure the same person again and again, and learn how to model the way each one changes over time.
Here are 18 people from a sleep-deprivation study. Each one took the same reaction-time test once a day for 10 days, so you have 180 readings in total, 10 for every person.
Here is a first, plain look: every reading against the day it was taken, with no information yet on which person it belongs to.
Scattered like that, you can see reaction times climbing a little overall, but nothing about who is driving that climb. Now add back which reading belongs to which person, and draw one line per person instead of one blob of points.
The lines do not stay side by side. They fan out as the days go on, some climbing fast and some barely moving at all.
Ten days, eighteen people, one test of reaction time
This data looks different from the usual compare-two-groups setup. There is no control group and no treatment group here. Instead, the same 18 people are measured again and again, once a day for 10 days, so every person contributes 10 rows instead of one.
That repetition matters. In an ordinary dataset, each row usually belongs to a different, unrelated person. Here, 10 of the 180 rows all belong to the same person, so they are not independent of each other: a person who reacts slowly on day 0 will likely also react slowly on day 3, simply because it is the same brain and the same body being tested each time.
This kind of data has a name. It is called repeated measures, or longitudinal data when the repeats are spread out over time. The grouping factor, the thing the rows cluster around, is the person, called Subject in this data. And the number everyone eventually wants is each person's own rate of change per day, not just their average reaction time.
Look at the data's shape, then compare the first day against the last.
180 rows, 3 variables, confirmed: a Reaction time in milliseconds, a Days count from 0 to 9, and a Subject label with 18 levels, one per person.
Day 0 looks tight: everyone sits close to the mean of 256.65 ms, with a standard deviation of 32.13 ms. By day 9, the mean has climbed to 350.85 ms, and the spread has more than doubled to 66.99 ms. Everyone got slower on average, but some far more than others, and that second part is exactly what an ordinary average cannot tell you.