Ask Mallard

Repeated measures and longitudinal data

Repeated measures data have more than one observation per participant, so the analysis must account for the correlation between a person's own measurements.

What question does this help answer?

How an outcome evolves over time, whether the trajectory differs between groups, and whether a difference appears, grows or fades across follow-up.

Decide what the question is before the model

Is it the difference at a specific time point, the difference in slope over time, or the difference in an overall summary such as area under the curve? These are three different estimands and they can point different ways. Choosing after seeing the plot is how a null trial acquires a significant time point.

What repeated measures look like

Repeated measures over visits. Each person is a thin line; some lines stop before the last visit, marked with an open circle. A thicker line shows the mean over time.Repeated measures: each person a line, some lines stopping earlyVisitOutcomeMean of those still measuredOpen circle: last visit before dropping outThe people who drop out here are the lower ones, so the mean of those still measured drifts upward partlybecause of who left. Measurements on one person are correlated; analysing only the last visit discardsmost of what was collected.
Conceptual diagram. It shows the structure of the idea, not data from any study.

The main approaches

  • Mixed-effects models: a random intercept per participant, optionally a random slope, giving subject-specific interpretation and handling missing visits under a missing-at-random assumption.
  • Generalized estimating equations: population-average interpretation with a working correlation structure and robust standard errors, requiring missing-completely-at-random for validity in their basic form.
  • Summary measures: reduce each participant to one number (area under the curve, slope, time to a threshold) and analyse that with a simple test. Crude, transparent, and often perfectly adequate.
  • Repeated-measures ANOVA: the classical approach, which requires sphericity and drops any participant with a missing visit. A mixed model is nearly always preferable.

Missing visits are the norm

People miss appointments, and they miss them for reasons connected to how they are doing. That makes the missingness mechanism a scientific question, not a technical one, and it must be named. Mixed models tolerate intermittently missing outcomes under missing-at-random; a complete-case analysis quietly assumes something much stronger.

Why Mallard may recommend it

Mallard may recommend a longitudinal analysis whenever the description mentions measurements at several time points, and it will size the study accounting for the within-person correlation rather than counting each visit as an independent observation.

What to watch out for

Two measurements on the same patient are more alike than two measurements on different patients, and an analysis that ignores that treats each visit as new information it is not, producing standard errors that are too small. The other common error runs in the opposite direction: analysing only the last visit, or only the change from first to last, discards most of the data collected and usually most of the power paid for.

Clinical example

Question: Does an inhaler regimen change symptom scores over six months? Analysis: A mixed-effects model with a random intercept per patient and a treatment-by-time interaction, with the estimand stated in advance as the difference in scores at six months.

Code for this method
Loading…
Recent studies that used this
Searching PubMed…
Related Learn pages
Sources & further reading
  1. Repeated Measures Designs and Analysis of Longitudinal Data (opens in a new tab) · Anesth Analg · doi 10.1213/ANE.0000000000003511
  2. Statistics notes: Analysing controlled trials with baseline and follow up measurements (opens in a new tab) · BMJ · doi 10.1136/bmj.323.7321.1123
Last source review: 2026-09-06
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.