Randomized clinical trials are the gold standard for causal inference, but they are often infeasible, unethical, too slow, or too narrow in scope to answer the questions most relevant to clinical and policy decision-making. Observational databases — electronic health records, insurance claims, disease registries — contain rich longitudinal data on millions of patients and offer an opportunity to answer causal questions at scale. But the translation from “data we have” to “causal question we want to answer” is fraught with opportunities for bias.
The target trial emulation framework provides a principled solution: explicitly specify the randomized trial you would have conducted if resources and ethics permitted (the target trial), then use observational data to emulate it as faithfully as possible.
In a randomized trial, two causal estimands are commonly of interest:
Definition 1 (Intention-to-Treat (ITT) Effect) The intention-to-treat effect is the causal effect of the assigned treatment strategy, regardless of whether participants actually adhered to their assigned strategy.
\[\text{ITT effect} = \text{E}{\left[Y^{a_{\text{assigned}} = 1}\right]} - \text{E}{\left[Y^{a_{\text{assigned}} = 0}\right]}.\]
Definition 2 (Per-Protocol (PP) Effect) The per-protocol effect is the causal effect of adhering to the assigned treatment strategy throughout follow-up.
\[\text{PP effect} = \text{E}{\left[Y^{\bar{a} = \text{adhere to arm 1}}\right]} - \text{E}{\left[Y^{\bar{a} = \text{adhere to arm 0}}\right]}.\]
The ITT analysis is straightforward in a randomized trial: randomization ensures that assigned treatment is independent of all baseline characteristics, so a simple comparison of outcomes by assigned group is valid. The ITT effect is often conservative (toward the null) when adherence is incomplete, because some participants in the active arm will not take the treatment.
The PP analysis is harder because non-adherence is not random: participants who discontinue treatment differ from those who continue in ways that are prognostically important. In a trial, PP analysis requires adjustment for post-randomization confounders (covariates that predict both adherence and the outcome), using precisely the methods from Chapters 19–21.
In observational data, a per-protocol analysis compares individuals who adhered to a specific treatment strategy throughout follow-up. This is a problem of time-varying treatment: treatment initiation, continuation, and discontinuation all occur over time, and all may be confounded by time-varying covariates. The g-methods of Chapter 21 — particularly IP weighting with censoring weights — are the appropriate tools.
To make the target trial concept concrete, consider a clinical question: “What is the effect of starting and maintaining antiretroviral therapy immediately versus deferring therapy until CD4 count falls below 350 cells/mm³ on the five-year risk of AIDS or death in HIV-positive individuals?”
The target trial for this question would specify:
Example 1 (Target Trial for ART Timing)
| Component | Specification |
|---|---|
| Eligibility criteria | HIV-positive adults with CD4 > 350, no prior ART |
| Treatment strategies | (1) Initiate ART immediately; (2) Defer until CD4 < 350 |
| Assignment | Random at time zero |
| Follow-up | From randomization until AIDS, death, or 5 years |
| Outcome | Composite: AIDS diagnosis or death within 5 years |
| Causal contrasts | Risk difference, risk ratio, hazard ratio between strategies |
| Analysis plan | ITT and PP (adjusted for non-adherence via IP weighting) |
The treatment strategies are sustained strategies: they specify a sequence of treatment decisions over the follow-up period, not just a single decision at baseline. Strategy 1 is “always treat” (\(\bar{a} = \bar{1}\)); strategy 2 is the dynamic strategy “do not treat until CD4 < 350, then treat.”
Many real-world clinical interventions involve decisions made repeatedly over time. The causal effect of sustained “always treat” versus sustained “never treat” is often different — sometimes radically so — from the effect of a single treatment initiation at baseline. The target trial framework makes this explicit by requiring the analyst to specify what the treatment strategy is over the entire follow-up, not just at the moment of treatment initiation.
Emulating the target trial means reproducing each component of the trial specification using observational data.
Eligibility criteria: Apply the same eligibility criteria to the observational cohort as would have been used in the trial (e.g., HIV-positive, CD4 > 350, no prior ART). Any individual who meets the criteria at some calendar time can serve as a “trial participant” at that time, creating sequential trials (discussed in Section 22.4).
Treatment strategies: Observe which individuals followed the target strategies (initiated immediately or waited until CD4 < 350). For the per-protocol analysis, censor individuals when they deviate from the strategy.
Assignment mechanism: In the trial, assignment is random. In the emulation, treatment initiation is not random — it depends on measured and unmeasured clinical characteristics. Sequential exchangeability (conditional on measured covariates) is the identifying assumption.
Follow-up and outcome: Use the same outcome definition and follow-up rules as specified in the target trial. Informative censoring (due to loss to follow-up or deviating from protocol) is handled via censoring IP weights.
Analysis: Apply the g-methods of Chapter 21. For the ITT analysis, compare the two initiation groups without adjustment for post-baseline treatment. For the PP analysis, use IP weighting to adjust for time-varying confounders of adherence.
In the emulation, the PP analysis requires censoring participants when they deviate from their “assigned” strategy (the strategy they were on at time zero). For example, under strategy 2 (“defer ART until CD4 < 350”), a participant is censored if they initiate ART before their CD4 reaches 350. This censoring is informative — sicker patients are more likely to start ART early — so censoring IP weights are needed.
The per-protocol analysis thus requires:
Time zero — the moment at which follow-up begins for each individual — is one of the most consequential choices in any observational study. Errors in defining time zero are responsible for a large class of systematic biases in the observational literature.
Definition 3 (Time Zero) Time zero for an individual is the point in calendar time at which:
All three conditions must be satisfied simultaneously at time zero.
Immortal time bias arises when there is a period of follow-up before time zero during which individuals cannot experience the outcome by design (because they must survive to meet the eligibility criterion or to be “assigned”). If this immortal time is misclassified — for example, attributed to the treated group when it actually preceded treatment initiation — the treated group appears to have better outcomes simply because they could not have died during the immortal period.
Example 2 (Immortal Time Bias: Statin and Mortality) Suppose we study whether statin use reduces mortality using an insurance claims database. We define “statin users” as individuals who filled a statin prescription at any point during a one-year observation window, and we compare their mortality during that year to “non-users.”
Individuals who died in the first week cannot fill a prescription, so they are automatically in the non-user group. Statin users, by definition, survived long enough to fill a prescription. This immortal time — the gap between study entry and first prescription — is misattributed to the treated group, inducing a spurious survival advantage.
One practical approach to correct time zero assignment in observational databases is the sequential trials design: for each calendar time \(t\) at which individuals satisfy the eligibility criteria, we create a separate “trial” with time zero at \(t\). Individuals can appear in multiple such trials (each with a different time zero) and their data are then pooled across all trials with appropriate adjustment for the time-varying covariates at each trial’s time zero.
This design ensures that each participant’s follow-up genuinely begins at the moment of eligibility and strategy assignment, eliminating immortal time bias by construction.
The target trial emulation framework provides a unifying conceptual scaffolding for all observational causal inference:
Theorem 1 (The Target Trial as a Unifying Framework) Any causal question about a medical or social intervention can be expressed as a target trial with:
The choice of g-method (g-formula, IP weighting, g-estimation) is secondary — what matters is first getting the trial specification right.
The target trial framework: