Ask Mallard

Immortal time bias

Immortal time is a stretch of follow-up during which the outcome could not have occurred, because of how exposure was defined, and which is then credited to the exposed group.

How it happens

It arises whenever exposure is defined by something that happens after follow-up starts. If a patient counts as treated because they filled a prescription in the first ninety days, then to be treated they must have survived those ninety days. Assign that survival time to the treated group and the treatment appears protective, having done nothing.

What the misclassified time looks like

Two versions of one person's follow-up. In the misclassified version, the time between cohort entry and the start of treatment is counted as treated time, although the person had to survive it to be treated. In the time-varying version, that same period is counted as untreated and only time after treatment starts counts as treated.Misclassified: the time before treatment starts is counted as treatedCounted as treated fromentryImmortal timeNever treatedTimeTime-varying: untreated until treatment starts, treated afterThe same personCounted as untreatedNever treatedTimeThe person's early survival is assigned to the period they were actually in. A landmark analysis isthe other defensible approach.Exposure measured or treatment startsOutcome occursThick line: exposed or treated time. Thin line: unexposed timeBroken line: immortal time
Conceptual diagram. It shows the structure of the idea, not data from any study.

Why it is easy to miss

The analysis looks ordinary. There is no missing data, no obvious confounder, no warning in the output. The error is in the alignment of time, and it produces effects large enough to be publishable: the bias grows in proportion to how much immortal time was misassigned.

How to avoid it

Align the start of follow-up, the assessment of eligibility, and the assignment of exposure at the same moment, the way a randomized trial does by construction. When exposure genuinely varies over time, model it as TIME-VARYING so that person-time before treatment counts as untreated. A landmark analysis is a simpler alternative: pick a fixed time, classify exposure as of that moment, and start follow-up there.

Why Mallard warns about it

Mallard names immortal time bias among the threats to a retrospective cohort, because it is the bias most likely to survive review in database studies where exposure is defined from records after the index date.

Key assumptions and design requirements

  • Time zero is defined explicitly, and exposure is known AT time zero.
  • Exposure defined by a later event is modelled as time-varying, not carried backwards.
  • If a landmark is used, its choice is prespecified and the trade-off in excluded early events is stated.
  • Person-time is attributed to the group the patient was actually in at the time it elapsed.
  • The design is described as a target trial would be: eligibility, assignment and follow-up start together.

What to watch out for

The bias makes the treatment look protective in proportion to how much immortal time was misassigned, so it is largest exactly where a drug appears most impressively effective. Excluding the immortal period rather than misclassifying it does not fix it; the time must be handled as time-varying exposure or with a landmark.

Clinical example

A database study reports that patients who received a post-discharge medication review had lower one-year mortality. If the review could occur any time in the first month, then survival to the review is built into being exposed. Counting that month as treated time makes the review look protective before it has done anything.

Recent studies that used this
Searching PubMed…
Part of the learning path Make a causal claim carefully (step 5 of 7).
Related Learn pages
Sources & further reading
  1. Immortal time bias in pharmaco-epidemiology (opens in a new tab) · Am J Epidemiol · doi 10.1093/aje/kwm324
  2. Observational studies: cohort and case-control studies (opens in a new tab) · Plast Reconstr Surg · doi 10.1097/PRS.0b013e3181f44abc
The first paper quantifies how the bias grows with the duration of misassigned immortal time and illustrates it in a real cohort. It is specific to pharmacoepidemiology in its examples but the mechanism is general to any cohort where exposure is defined after follow-up begins.
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.