Tutorials › Marginal Structural Models › Worked Emulation of a Treatment-Initiation Trial

Target Trial Emulation · Tutorial 466 of 501

Worked Emulation of a Treatment-Initiation Trial

Learn to specify a treatment-initiation trial and align each protocol element with the corresponding information in observational longitudinal data.

Intermediate 13 min read

What You'll Learn

  • Specify eligibility criteria and treatment strategies for an initiation-versus-non-initiation comparison.
  • Align assignment, time zero, and covariate measurement to prevent selection and timing errors.
  • Map a trial protocol to person-level and longitudinal records.
  • Define a treatment-policy risk estimand for baseline initiation.
  • Standardize stratum-specific risks and assess the assumptions needed for a causal interpretation.

From a Clinical Question to a Trial Protocol

A comparison of people who start a treatment with those who do not is not yet a well-defined causal question. The groups may differ in when they become eligible, how treatment is classified, or how long outcomes are observed. A target-trial protocol makes those decisions explicit before the observational data are analyzed. Here the question is the effect of initiating treatment at baseline versus not initiating at baseline, while allowing subsequent care to proceed as it ordinarily would.

This is a treatment-policy comparison: assignment is defined by initiation at time zero, not by remaining on treatment throughout follow-up. Later stopping, restarting, or switching is part of the subsequent care pathway. The causal effect therefore concerns the initial treatment decision, not adherence to a sustained regimen.

Definition: A target-trial protocol specifies the target population, eligibility criteria, treatment strategies, assignment procedures, time zero, follow-up, outcome, causal contrast, and analysis plan. In an emulation, each element is translated into a rule for selecting and organizing observational records.

The central alignment requirement is that eligibility, treatment assignment, and the start of follow-up refer to the same time. If a person is classified as an initiator using treatment received days after follow-up begins, that person must remain alive and eligible long enough to receive treatment. This can create immortal time and selection bias. The earlier material on immortal time bias and eligibility selection explains why the protocol must define treatment status at the common time zero.

A Complete Initiation-Trial Protocol

Consider adults with a newly diagnosed inflammatory condition for whom a particular medication is clinically appropriate. The protocol below compares initiating the medication at the eligibility visit with not initiating it at that visit.

Protocol elementTrial specificationObservational-data rule
Target populationAdults with the condition who could reasonably receive either strategyPatients meeting the recorded clinical and demographic criteria
EligibilityDiagnosis confirmed; no use of the medication in the prior year; no contraindication; no prior outcome eventApply these criteria using information recorded on or before the index visit
StrategiesInitiate medication at the index visit; do not initiate at that visitClassify exposure from dispensing or administration records linked to the index date
AssignmentRandom assignment at the index visitObserved initiation, adjusted or standardized for measured baseline confounders
Time zeroThe eligibility and assignment visitThe same index date for eligibility, exposure classification, and follow-up
Follow-upFrom time zero through 12 monthsUse event dates and censoring dates to determine each person's observed follow-up
OutcomeFirst unplanned hospitalization or death within 12 monthsIdentify the first qualifying event during the defined follow-up window
EstimandDifference in 12-month risks under the two baseline strategiesEstimate standardized risks in the target population and contrast them

“Do not initiate at the visit” does not mean “never use the medication.” A patient assigned to that strategy in the target trial may start later, just as a patient who initiates may later stop. The estimand is the effect of the baseline initiation decision under the subsequent care that follows each decision. A protocol that instead requires sustained treatment would define a different question.

Worked Example: Specifying the Index Visit

A registry contains diagnosis dates, clinic visits, prescriptions, contraindications, and hospitalizations. The research question is whether starting medication M at an eligible visit changes the 12-month risk of hospitalization or death.

Suppose a patient is diagnosed on March 3, has an eligible visit on March 10, and fills M on March 10. The March 10 visit can be time zero if eligibility is assessed using information available by that visit and initiation on that date is the prespecified exposure rule. Follow-up begins March 10.

A second patient meets the criteria at a visit on March 10 but does not fill M that day. This patient belongs to the non-initiation-at-baseline group, even if M is prescribed in June. That later prescription is a post-baseline treatment change, not a reason to revise baseline assignment.

By contrast, classifying the second patient as a non-initiator only if they never fill M during the year would use future information to define baseline groups. It would also make group membership depend on surviving and remaining observed long enough to establish “never.” The protocol avoids this by classifying treatment at the common index date.

Mapping the Protocol to Longitudinal Data

A typical data source has multiple records per person: one row per visit, prescription, measurement, or outcome. Emulation requires first constructing one eligible index record per person (or per eligible trial entry, if repeated entry is part of the design). Baseline covariates must be measured in a prespecified window ending no later than time zero. A measurement taken after initiation may be affected by treatment and should not silently be treated as a baseline confounder.

For each eligible index record, the analysis dataset should identify the person, index date, baseline covariates, initiation status at that date, outcome date, last known observation date, and administrative end date. Follow-up ends at the first qualifying outcome, loss to follow-up, administrative end, or 12 months, whichever occurs first. If outcome ascertainment stops before 12 months, the person’s unobserved outcome is not equivalent to “no event”; the analysis must address censoring under an appropriate assumption.

Worked Example: Translating a Patient’s Records

A patient meets all eligibility criteria on January 1. Baseline severity is recorded on December 20, medication M is dispensed on January 1, an unplanned hospitalization occurs on August 15, and the database closes on December 31. The endpoint is the first hospitalization or death within 12 months.

The index date and time zero are January 1. The December 20 severity measurement is a baseline covariate because it precedes time zero and falls in the prespecified measurement window. The patient is classified in the initiation group because M is dispensed on January 1.

Follow-up ends on August 15, when the endpoint occurs. The person contributes an outcome event within 12 months; no information after August 15 is needed for this endpoint. If the patient had no event and remained observable through December 31, the 12-month outcome would be recorded as absent. If observation instead ended on July 1 with no event, the 12-month outcome would be unknown because follow-up was incomplete.

The record does not become a new baseline record merely because the patient later changes treatment. Such changes are downstream of the baseline strategy in this treatment-policy comparison.

Estimand and Identification

Let \(A=1\) denote initiation at time zero and \(A=0\) denote non-initiation at time zero. Let \(Y^a\) be the indicator of the endpoint by 12 months under baseline strategy \(a\), and let \(L\) denote measured baseline covariates. A useful estimand is the population risk difference:

$$ \psi = P(Y^1=1)-P(Y^0=1). $$

A negative value means a lower 12-month endpoint risk under initiation. For identification from observational data, assume consistency (the observed outcome equals \(Y^a\) when \(A=a\)); conditional exchangeability, \(Y^a \perp A \mid L\); and positivity, \(P(A=a\mid L=l)>0\) for each strategy and covariate stratum represented in the target population. Also assume no interference between individuals, valid measurement of eligibility, treatment, covariates, outcome, and censoring, and either complete outcome ascertainment or censoring handled under a suitable conditional independent-censoring assumption.

Theorem: Under consistency, conditional exchangeability, positivity, and complete outcome ascertainment, for \(a\in\{0,1\}\), \(P(Y^a=1)=\sum_l P(Y=1\mid A=a,L=l)P(L=l)\) when \(L\) is discrete. For continuous \(L\), replace the sum by integration with respect to the target-population distribution of \(L\).

To derive the result, first average the counterfactual risk over baseline covariates:

$$ P(Y^a=1)=\sum_l P(Y^a=1\mid L=l)P(L=l). $$

Conditional exchangeability allows the conditional counterfactual risk to be replaced by the risk among those with observed assignment \(a\): \(P(Y^a=1\mid L=l)=P(Y^a=1\mid A=a,L=l)\). By consistency, within that group \(Y^a=Y\), so \(P(Y^a=1\mid A=a,L=l)=P(Y=1\mid A=a,L=l)\). Positivity ensures these observed conditional risks are defined in every target stratum. Substitution gives the stated formula. The risk difference follows by subtracting the formula for \(a=0\) from that for \(a=1\). \(\square\)

This result motivates standardization: estimate the outcome risk within each baseline covariate stratum and average those risks using the covariate distribution of the target population. It does not guarantee that the assumptions hold. In particular, unmeasured confounding, poor overlap, or differential outcome ascertainment can undermine a causal interpretation.

Worked Example: Standardizing Risks

Suppose \(L=1\) denotes high baseline severity. In the target population, 40% have high severity. The observed 12-month risks are 0.20 for initiators with high severity and 0.08 for initiators with low severity; among non-initiators, the corresponding risks are 0.35 and 0.15.

The standardized initiation risk is \(0.40(0.20)+0.60(0.08)=0.080+0.048=0.128\). The standardized non-initiation risk is \(0.40(0.35)+0.60(0.15)=0.140+0.090=0.230\). Therefore the standardized risk difference is \(0.128-0.230=-0.102\), or a 10.2 percentage-point lower risk under initiation, if the identification assumptions hold.

The crude risks need not equal these standardized risks. For example, if 60% of initiators but only 30% of non-initiators have high severity, the crude initiation risk is \(0.60(0.20)+0.40(0.08)=0.152\), while the crude non-initiation risk is \(0.30(0.35)+0.70(0.15)=0.210\). The crude difference is \(-0.058\), not \(-0.102\), because the groups have different baseline severity distributions.

Risk From Longitudinal Event Records

When outcome records are organized by intervals, the cumulative risk can be reconstructed from interval-specific event probabilities. Let \(T\) be the first interval in which the endpoint occurs, and let \(h_a(t)\) be the probability of an event in interval \(t\), conditional on strategy \(a\) and remaining event-free at the start of that interval. Assume the event is ascertained in every interval through \(K\), with no competing event treated as a separate outcome in this example.

Result: The risk of an event by the end of interval \(K\), under strategy \(a\), is \(1-\prod_{t=1}^{K}\{1-h_a(t)\}\).

To see this, let \(S_a(t)\) be the probability of remaining event-free through interval \(t\), with \(S_a(0)=1\). By the definition of the conditional event probability, \(S_a(t)=S_a(t-1)\{1-h_a(t)\}\). Applying this relation successively gives \(S_a(K)=\prod_{t=1}^{K}\{1-h_a(t)\}\). The event by \(K\) is the complement of remaining event-free, so its risk is \(1-S_a(K)\), as claimed. This calculation uses conditional probabilities in sequence; it does not assume that interval outcomes are independent. \(\square\)

In an emulation, an individual with a first event contributes event-free follow-up before that event and is no longer at risk afterward. If follow-up ends early, later intervals are censored rather than coded event-free. Estimating interval risks therefore requires appropriate handling of incomplete observation as well as confounding by baseline covariates.

Diagnostics, Alternatives, and Limits

Before interpreting an estimate, audit the protocol against the records. Check whether treatment classification is based only on information available at time zero, whether baseline covariate windows end before assignment, whether outcome and censoring dates are ordered sensibly, and whether each person’s follow-up stops at the first endpoint or censoring event. Assess treatment overlap across important baseline covariates; near-empty strata make standardization unstable and may require narrowing the target population or revising the protocol. Compare follow-up and outcome capture between groups, because markedly different observation can create bias even when treatment is well defined.

A common alternative is a prevalent-user comparison, which includes people already taking treatment at cohort entry. That answers a different question and can select people who tolerated and persisted with treatment before entry. An “ever treated” versus “never treated” comparison is also not equivalent to baseline initiation: it classifies exposure using future information. A randomized trial would avoid confounding through random assignment, while an observational emulation relies on measured covariates and the assumptions stated above. Conventional regression adjustment can target the same baseline contrast when correctly specified, but standardization makes the target covariate distribution and the risk-scale contrast explicit.

The protocol’s limits should remain visible. The answer applies to the specified eligible population, version of treatment, index-time rule, outcome definition, and follow-up horizon. It does not automatically generalize to people with contraindications, other treatment versions, or longer-term effects. If treatment changes after baseline are affected by evolving prognosis, a baseline treatment-policy effect should not be relabeled as the effect of sustained treatment. Outcome ascertainment after loss to follow-up also cannot be recovered merely by defining a 12-month window.

  • Pitfall: “We will call anyone who starts M within 30 days an initiator and begin follow-up on the eligibility date.” This uses future treatment to define a group whose members must remain observable long enough to start, creating a time-zero mismatch.
  • Correction: Either define initiation at the common baseline date, as in this protocol, or specify a genuine grace-period strategy and use an emulation method that correctly handles that period.
  • Pitfall: Treating a patient with incomplete 12-month observation and no recorded event as having no event.
  • Correction: Distinguish event-free completed follow-up from censoring and state the assumptions and methods used to address incomplete observation.
Key takeaway: A credible initiation comparison begins with a protocol in which eligibility, baseline treatment classification, and follow-up start are aligned. The data analysis then estimates the protocol’s risk contrast, not a vaguely defined difference between people who eventually did and did not receive treatment.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A patient is eligible on April 1, does not initiate then, and starts treatment on May 1. Under the baseline initiation protocol, which group is the patient assigned to?
  2. Why must baseline confounders be measured before or at time zero?
  3. In a target population with 25% high severity, risks under initiation are 0.12 for high severity and 0.06 for low severity. What is the standardized risk?
  4. State the assumptions that allow observed covariate-specific risks to identify counterfactual risks.
  5. If someone has no recorded event but is lost after six months, can their 12-month outcome be coded as absent? Why or why not?

Solutions. (1) The patient is in the non-initiation-at-baseline group; the May 1 start is a later treatment change. (2) Post-baseline covariates may be affected by treatment, so adjusting for them as baseline confounders can change the estimand or introduce bias. (3) The standardized risk is \(0.25(0.12)+0.75(0.06)=0.030+0.045=0.075\), or 7.5%. (4) Consistency, conditional exchangeability, positivity, and valid outcome ascertainment are required, along with no interference; incomplete follow-up additionally requires an appropriate censoring assumption or method. (5) No. The patient’s outcome after loss is unobserved, so absence of a recorded event is not evidence of an event-free 12-month outcome.

Clinical Biostats