Why the Timeline Matters
A treatment group should not receive guaranteed event-free time merely because its members must remain alive and outcome-free long enough to qualify for that group. This problem, called immortal-time bias, can make a treatment appear protective even when the apparent advantage comes from how follow-up and treatment status were defined.
The error is easiest to detect by placing four events on one timeline: when a person becomes eligible, when the treatment strategy is assigned or classified, when treatment actually begins, and when outcome follow-up starts. The key question is whether the protocol counts the same period as follow-up for both strategies, while classifying some of that period according to treatment received later.
The word “immortal” is shorthand: the person need not be guaranteed survival in a biological sense. Rather, if the outcome occurs before the person could meet the rule for treatment-group membership, that person cannot be counted in that group. For a death outcome, the person must survive until treatment initiation to be classified as treated. For a different endpoint, such as hospitalization, the relevant requirement may be remaining free of that endpoint until initiation.
Read the Protocol as a Timeline
Let \(t_0\) denote eligibility and the start of outcome follow-up. Suppose a protocol calls a person “treated” if they initiate treatment at any time during the next \(g\) days, but starts follow-up at \(t_0\). A person classified as treated must remain eligible and observable until their actual initiation time. If an outcome before initiation prevents later treatment or makes the person ineligible for the treated category, that pre-initiation time is guaranteed to be outcome-free among people eventually classified as treated.
The problematic rule is not simply “treatment starts after \(t_0\).” Treatment often does start after eligibility in a valid protocol. The problem arises when the protocol uses future receipt to define baseline groups, then credits the treated group with time before treatment as though its members had been treated from \(t_0\). The interval from \(t_0\) to \(t_i\) is counted as treated follow-up even though treatment had not yet begun.
A grace period is not automatically an error. A strategy such as “initiate within 30 days” can be defined at \(t_0\), with outcomes counted from \(t_0\), provided the analysis represents that strategy rather than retrospectively assigning people to groups based on who eventually initiated. The earlier material on cloning strategies for grace-period emulation provides one way to represent such strategies. Whatever method is used, an outcome during the grace period must not disappear merely because it prevents later initiation.
Worked Example: Finding the Guaranteed Event-Free Interval
Consider a hypothetical protocol that identifies 500 eligible patients on day 0, starts follow-up immediately, and defines “treated” as initiating a medication by day 30. A patient who initiates on day 18 is classified as treated from day 0. A patient who dies on day 10 cannot initiate and is therefore classified as untreated.
For the patient who starts on day 18, the interval from day 0 through day 17 is assigned to the treated group even though the patient was not yet taking the medication. If death is the outcome, survival through day 17 was necessary for this patient to become a treated initiator. The treated group therefore has 18 days of event-free time by construction for this individual.
For the patient who dies on day 10, the death is counted in the untreated group. The two groups are not formed by a common baseline assignment: membership depends on what happens after day 0. This protocol has an immortal-time error because follow-up begins at eligibility but treatment status is assigned using later initiation. A repair must either define and analyze strategies from day 0 or move both group classification and follow-up to a justified common later time.
Why the Error Can Distort a Comparison
The mechanical source of the bias can be written in terms of a follow-up risk. Let \(Y\) indicate occurrence of the outcome by a fixed horizon, and let \(A_g=1\) mean that treatment was initiated within a grace period \(g\). In a future-defined treated group, anyone with an outcome that prevents initiation before the person starts treatment cannot have \(A_g=1\). Thus, for those individuals, membership in the treated group entails surviving outcome-free until initiation.
When the outcome before initiation makes later initiation impossible, the first term is zero by the group definition, not because treatment prevented the outcome. Comparing this risk with the risk in a group that includes early events can therefore favor treatment for purely structural reasons. This does not mean every observed contrast must be biased in the same direction or by the same amount: other selection mechanisms and outcome patterns also matter. The defining warning is that one group’s membership requires a period of outcome-free survival that the comparison group’s membership does not.
Worked Example: How Future-Based Classification Changes the Risks
In a hypothetical cohort of 100 eligible people, follow-up begins on day 0. Forty people initiate treatment by day 30; all 40 are alive and free of the outcome until their initiation. Among these 40, four have the outcome after initiation and before day 365. Of the 60 who do not initiate by day 30, 12 have the outcome before day 30 and another 18 have it between day 30 and day 365.
Under the future-based classification, the treated-group risk is calculated as \(4/40=0.10\), or 10.0% by day 365. The noninitiator risk is \((12+18)/60=30/60=0.50\), or 50.0% by day 365. The observed risk difference, treated minus noninitiator, is \(0.10-0.50=-0.40\), or −40.0 percentage points.
That arithmetic is correct for these retrospectively defined groups, but it is not a valid estimate of a causal effect of treatment initiation. The treated group has no outcomes before its members initiate because an early outcome would prevent membership in that group. The 12 early outcomes are instead assigned to noninitiators. The observed contrast combines any treatment effect with this built-in classification advantage; it cannot separate the two.
The example does not show that the true causal effect is zero or that the entire contrast is caused by immortal time. It shows why the crude contrast cannot be interpreted as a treatment effect under this protocol. Correcting the timeline is necessary before addressing other sources of bias.
Revise the Protocol Before Choosing an Estimator
A sound repair starts with a clearly specified question and a common time zero. The earlier material on aligning eligibility, assignment, and time zero in causal designs is relevant: the protocol should make clear which strategies are being compared, when people are eligible for each, and when outcome follow-up begins. The treatment received later in the data is not itself a baseline assignment.
Specify the date on which each person satisfies the eligibility criteria and the date outcome follow-up begins. These dates should align with the strategies being compared.
For example, compare “initiate within 30 days” with “do not initiate during those 30 days.” State what each strategy requires during the grace period and after it.
Do not remove or reassign an outcome merely because it occurs before a person could satisfy a later treatment-receipt rule. Determine how the defined strategy handles that event.
Use an analysis that respects the time-varying strategy requirements. If using a grace-period emulation, cloning and appropriate handling of deviations can represent the strategies from baseline. Do not label all eventual initiators treated from baseline without justification.
The protocol must also state the outcome horizon and endpoint. For instance, “death by day 365 after eligibility” has a common clock starting at eligibility. Starting the clock at treatment initiation for initiators but at eligibility for noninitiators gives the groups different time origins and changes the question. A different time origin can be defensible if it is explicitly part of the target question and applied comparably, but it does not repair an unacknowledged mismatch.
Worked Example: Repairing a 14-Day Initiation Protocol
A hypothetical study asks whether initiating a new drug within 14 days of eligibility reduces 180-day mortality compared with not initiating during those 14 days. Eligibility is assessed on day 0. A flawed analysis starts follow-up on day 0, calls everyone who eventually initiates by day 14 treated from day 0, and calls everyone else untreated.
Protocol repair. Define the two strategies at day 0: (1) initiate the drug within 14 days, and (2) do not initiate it during those 14 days. Define mortality follow-up from day 0 through day 180 for both strategies. A death on day 5 is an outcome during follow-up; it cannot be discarded because the person did not live to initiate.
To emulate these strategies with observational records, one can use the cloning approach for grace-period emulation: at day 0, represent each eligible person under each strategy with which their observed history is initially compatible. Follow each representation from day 0, and handle subsequent treatment histories according to the strategy rules. In particular, an early death is recorded as an outcome rather than used to retrospectively classify the person as a noninitiator. Estimation may require additional methods for deviations from strategy; merely writing the corrected protocol does not guarantee unbiased estimation.
A different option is a day-14 landmark analysis: include only people alive and eligible at day 14, classify initiation status by that date, and begin follow-up on day 14. This avoids crediting the treated group with pre-initiation follow-up, but it answers a narrower question among day-14 survivors. It does not estimate the effect from day-0 eligibility for everyone initially eligible.
Diagnostics, Alternatives, and Limits
Immortal-time errors can often be found by auditing the protocol and the data construction before calculating any effect estimate. For every group, write down the exact membership rule and ask whether it refers to information recorded after follow-up begins. Then inspect whether an outcome during the interval before treatment can prevent group membership, be excluded, or be attributed to another group. Finally, verify that the risk sets and time origin are consistent with the stated strategy.
- Future-defined exposure: “ever treated,” “initiated within 30 days,” or “completed a course” is used to assign baseline treatment groups.
- Outcome-free time appears only in one group: the treated category requires survival or freedom from the endpoint until initiation, while early events are counted among controls or excluded.
- Follow-up clocks differ: one group starts at eligibility and another at initiation, without the protocol defining that contrast as its target question.
- Unexplained early-event pattern: no treated-group events occur before initiation even though that time is included in the treated group’s follow-up.
These are warning signs, not standalone statistical tests. A table of event dates and treatment dates can reveal a mismatch, but absence of an obvious pattern does not prove that the protocol is valid. The decisive check is whether the classification and follow-up rules logically create an outcome-free interval.
| Approach | What it does | Key limitation |
|---|---|---|
| Baseline groups defined by future initiation | Classifies treatment using what happens after eligibility, often counting earlier follow-up as treated. | Can build immortal time into the treated group; does not by itself define a valid causal contrast. |
| Landmark analysis | Classifies exposure at a prespecified landmark and starts follow-up there for those eligible at that time. | Changes the target population to landmark survivors and may omit important early outcomes. |
| Time-varying treatment representation | Records treatment as changing over time rather than assigning eventual users to treated status from baseline. | Addresses exposure timing, but does not automatically address confounding, strategy deviations, or other design problems. |
| Grace-period strategy emulation | Defines treatment strategies at a common baseline and follows outcomes from that baseline while representing the grace-period rules. | Requires correct strategy specification and appropriate analysis of observed deviations; it is not achieved by simply labeling eventual initiators. |
No single repair is best for every question. A landmark analysis is transparent when the scientific question concerns people who have reached a particular time alive and eligible, but it is not a substitute for a baseline question about all eligible people. A time-varying exposure analysis can avoid the particular error of assigning pre-initiation time to the treated state, but treatment timing may depend on changing health status. That creates other causal challenges. Grace-period emulation preserves a baseline strategy question when specified and analyzed appropriately, but it requires sufficient data to establish eligibility, treatment history, outcomes, and relevant covariates.
Immortal-time correction is therefore necessary but not sufficient. It does not by itself eliminate confounding, selection, measurement error, or lack of support for comparing the strategies. Nor does a correct timeline establish that the treatment strategies are clinically meaningful or that the required information is available. The protocol should make the timeline, the target contrast, and the handling of every interval explicit before estimation.
Common Mistake
Wrong reasoning: “Everyone classified as treated did eventually receive the drug, so counting their time from eligibility as treated is a fair comparison.”
Correction: Eventual receipt is future information. If a person must remain alive and outcome-free until initiation to enter the treated group, the pre-initiation interval is guaranteed event-free for that group under the classification rule. Either define the strategies at a common baseline and represent the grace period correctly, or choose a later time origin and state the resulting survivor population and question. Do not interpret the future-defined group contrast as a treatment effect merely because its arithmetic is straightforward.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A cohort starts follow-up at eligibility. “Treated” means receiving a procedure within 20 days. A person with the outcome on day 8 is classified as untreated because the procedure was never received. What is the potential timeline error?
- In a hypothetical study, 30 of 60 eventual initiators have an outcome after initiation, while 10 of 40 noninitiators have an outcome. Can \(30/60\) versus \(10/40\) be interpreted as the causal effect of treatment? Give the central reason.
- What population and follow-up question does a day-20 landmark analysis address if it includes only people alive and eligible on day 20?
- A protocol compares “start within 10 days” with “do not start within 10 days,” defines both strategies at eligibility, and counts outcomes from eligibility. Is the grace period alone an immortal-time error? What must the analysis ensure?
Solutions. (1) The treated group is defined using future receipt. If a day-8 outcome prevents later procedure, that person cannot enter the treated group; counting pre-procedure time from eligibility as treated for eventual initiators creates a guaranteed event-free interval. (2) No. The comparison is between groups defined by future initiation, and early outcomes may prevent membership among initiators. The risks \(30/60=50.0\%\) and \(10/40=25.0\%\) are descriptive for those constructed groups, not automatically a causal contrast. (3) It addresses outcomes after day 20 among people who survived and remained eligible to that landmark, classified by procedure status up to day 20. It does not include outcomes before day 20 or represent the baseline population of everyone eligible at the outset. (4) No. A grace period can be part of a valid strategy defined at baseline. The analysis must represent the strategy rules from the common eligibility time and retain outcomes during the grace period; it must not retrospectively assign all eventual initiators to treatment from baseline or omit early outcomes.