← Methods repository
concept

Intention-to-Treat (ITT) Analysis in RWE and Target Trials

An analysis strategy that locks each person to the treatment strategy assigned or emulated at time zero and counts follow-up and outcomes under that initial strategy regardless of later discontinuation, switching, non-adherence, dose changes, or add-on therapy.

Causal_Inference_Methodintention-to-treatitttreatment-policytarget-trial-emulationactive-comparator-new-userinitiation-effectintercurrent-eventscausal-inference
Methods reference only. Use primary source citations and local policy before applying this in a study protocol, regulatory submission, payer dossier, or clinical decision.

In plain language

Intention-to-treat analysis keeps each patient in the treatment group they started in, even if they later stop, switch, or add another treatment. In a randomized trial this protects the original random assignment. In real-world data it is better described as the effect of the initial treatment decision under usual-care adherence, because clinicians and patients chose the starting treatment rather than being randomized.

Intention-to-treat (ITT) analysis

estimates the effect of initiating or being assigned to a treatment strategy, not the effect of actually taking treatment continuously. In a randomized trial, the ITT principle protects the baseline exchangeability created by randomization: participants are analyzed in the groups to which they were assigned, and post-randomization non-adherence, switching, and rescue treatment are treated as part of the treatment policy being compared. In an RWE target-trial emulation there is no randomized assignment to preserve, so "ITT" is more precisely the observational analog of the treatment-policy or initiation effect: define eligible people at time zero, assign the arm from the baseline treatment decision that the data can observe, adjust for baseline confounding, then follow everyone under the initial strategy even if real-world care later diverges.

The important discipline is that ITT is an estimand choice, not a magic bias shield. For a two-drug new-user study, an ITT-style emulation asks, "What is the effect of starting drug A rather than drug B under the adherence and switching patterns that normally follow that start?" It does not ask, "What is the effect if everyone remains on drug A for two years?" Heavy discontinuation or crossover can dilute an ITT contrast toward no difference, but that dilution may be exactly the policy-relevant answer when the decision maker cares about recommending a strategy in usual care. Conversely, if the scientific question is biological efficacy while adherent, a per-protocol or while-on-treatment estimand is the right companion analysis.

Pros, cons, and trade-offs

- vs per-protocol analysis: ITT is simpler, avoids conditioning on post-baseline adherence, and is usually the primary policy-effect contrast. It remains interpretable when discontinuation and switching are expected parts of usual care. Cost: it can be diluted by non-adherence and cannot isolate the effect under full protocol adherence. Prefer ITT when the decision is "start this strategy" or "assign this policy"; prefer per-protocol when the decision is "what if patients actually follow the strategy?" - vs naive as-treated analysis: ITT avoids the selection bias created by reclassifying or censoring people based on post-baseline behavior. A naive as-treated analysis often makes adherers look healthier because adherence is a prognostic post-baseline variable. Cost: ITT attributes off-treatment follow-up to the initial arm, so acute pharmacologic risk questions can be washed out. Use as-treated only with explicit risk-window construction and informative-censoring adjustment. - vs treatment-policy estimand under ICH E9(R1): They are close but not identical labels. ICH E9(R1) frames treatment policy as an intercurrent-event strategy: outcomes are used regardless of events such as treatment discontinuation or additional medication. ITT in RWE is the operational emulation of that idea when the initial treatment decision can be observed at a single time zero. - vs target-trial emulation generally: ITT is one causal contrast within a target-trial protocol. The target trial still must specify eligibility, strategies, time zero, follow-up, outcome, censoring, and summary measure. Calling an analysis "ITT" does not fix immortal time, prevalent-user bias, or baseline confounding if those design elements are wrong.

When to use

Use ITT-style analysis as the primary contrast for active-comparator new-user RWE studies of treatment initiation, pragmatic or registry-based trials where real-world adherence is part of the intervention package, policy questions about recommending or covering a strategy, and target-trial emulations where switching/discontinuation is an intercurrent event to be included in the effect rather than prevented. It is especially appropriate when the treatment decision is made at a clean baseline time zero, follow-up can continue regardless of later treatment changes, and the decision maker needs the effect of starting or assigning the strategy under usual-care adherence.

When NOT to use - and when it is actively misleading

- The question is the effect of sustained adherence. If stakeholders need the effect under "remain on treatment for 12 months" or "follow treat-to-target without rescue therapy," an ITT analysis answers the wrong question. Use per-protocol, clone-censor-weight, or another g-method aligned to the sustained strategy. - Treatment is defined by future behavior. A label such as "completed 6 cycles" or "received surgery within 90 days" cannot be an ITT arm assigned at time zero unless everyone is cloned into baseline-compatible strategies. If the arm is known only after survival through a grace period, a naive ITT label creates immortal time. - Follow-up after switching is not observable or comparable. ITT requires outcome capture after discontinuation and switching. If claims enrollment ends when patients leave a plan, or an EHR cannot observe care outside the system, "follow regardless of adherence" is not implemented by the data; informative censoring must be handled explicitly. - Crossover is so common that the initiation decision no longer has clinical meaning. The ITT effect may still be valid for a policy contrast, but it will not communicate biological efficacy. Report adherence and switching patterns, and include a per-protocol companion rather than overselling the ITT estimate. - Baseline exchangeability is assumed rather than built. In observational data, the initial treatment strategy is selected by clinicians and patients. ITT-style follow-up does not remove confounding by indication; it must be paired with a defensible new-user design and baseline adjustment or weighting.

Data-source operational depth

- Claims: The cleanest ITT-style RWE contrast is an active-comparator new-user cohort: index date = first qualifying NDC fill after a washout; arm = drug class on that fill; baseline covariates come only from the lookback; follow-up ignores later refill gaps, discontinuation, switching, and add-on therapy unless they are part of censoring or competing-risk rules. Require continuous medical + pharmacy enrollment across lookback and follow-up so outcome capture continues after switching. Medicare Advantage-only person-time can break ITT implementation because the absence of fills or outcomes may be missing FFS data rather than true non-use or no event. - EHR: The arm should be anchored to an order or administration decision that is captured at time zero. Later treatment changes stay in follow-up, but encounter leakage can make post-switch outcomes invisible; define an active observation rule and model loss to follow-up if it is prognostic. An unfilled prescription order may be a strategy decision but not actual initiation, so state whether the ITT emulates assignment/order or dispensing/start. - Registry: Strong for assigned treatment, disease severity, and adjudicated outcomes, but often weak for complete medication changes outside registry visits. ITT is feasible when outcomes remain ascertained after off-protocol care; link to claims, pharmacy, or vital records to avoid differential missingness after switching. - Linked claims-EHR-vital records: Best substrate for ITT-style emulation because the index treatment decision, baseline severity, subsequent outcomes, and death can all be observed. The main risk is selection into the linkable subset; describe the population as linkable patients if linkage determines eligibility or follow-up completeness.

Worked claims example

Question: among adults with type 2 diabetes and stage-3 CKD, what is the 2-year ITT-style effect of initiating an SGLT2 inhibitor vs a DPP-4 inhibitor on hospitalization for heart failure? Eligibility is assessed at the first qualifying fill after 365 days of continuous medical + pharmacy enrollment. The arm is locked from the NDC on that first fill. Baseline confounding is adjusted with overlap weights from pre-index covariates. Follow-up starts on the fill date and continues for two years regardless of later refill gaps, discontinuation, switch to the other class, add-on therapy, or dose changes. Censor only at structural loss of observable follow-up (disenroll, data end) and handle death according to the pre-specified estimand, for example as a competing event when the endpoint is non-fatal hospitalization. Report arm-specific 2-year cumulative incidence and the risk difference, plus adherence and switching summaries so readers can see how much usual-care behavior diluted the initiation contrast.

Worked example

Scenario

A claims analyst compares new users of SGLT2 inhibitors with new users of DPP-4 inhibitors among adults with type 2 diabetes and CKD. Each patient is assigned to the arm of the first qualifying fill after a 365-day washout. The analyst follows everyone for 730 days for hospitalization for heart failure, ignoring later switching or discontinuation because the target estimand is the initiation/treatment-policy effect.

Dataset

Four simplified patients in an ITT-style active-comparator new-user emulation. The assigned arm is fixed at the index fill even when later treatment behavior changes.

person_idindex_dateassigned_armlater_treatment_behaviorhhf_datestructural_censor_datecounted_in_assigned_arm_through
P10012024-01-03SGLT2icontinues SGLT2i2026-01-032026-01-03
P10022024-02-10SGLT2iswitches to DPP-4i on 2024-08-202025-05-012026-02-102026-02-10
P20012024-01-15DPP-4istops after first fill2025-06-302025-06-30
P20022024-03-01DPP-4iadds SGLT2i on 2024-12-012024-10-052026-03-012026-03-01

Steps

  • Set time zero to the first qualifying fill after the washout. P1002 is an SGLT2i initiator on 2024-02-10 even though they later switch to DPP-4i.

  • Build baseline covariates only from the pre-index window. Do not adjust for switching, adherence, or post-index utilization when estimating the primary ITT effect.

  • Count P1002's 2025-05-01 heart-failure hospitalization in the SGLT2i arm because that is the arm locked at time zero. The switch is part of usual-care follow-up under the treatment-policy estimand.

  • Count P2002's 2024-10-05 event in the DPP-4i arm even though they later add an SGLT2i; the event occurs before the add-on and the arm never changes.

  • Censor P2001 at disenrollment on 2025-06-30 because outcome capture ends structurally. Do not censor at stopping treatment; stopping is an intercurrent event included in the ITT contrast.

Result

The analytic dataset has one row per initiator, fixed assigned arm, baseline-only adjustment variables, a two-year outcome indicator, and a structural censoring time. Later treatment behavior is summarized descriptively but does not reassign or censor the primary ITT analysis.

Runnable example

python implementation

Build an ITT-style analytic dataset from an active-comparator new-user cohort. Inputs: cohort : person_id, index_date, assigned_arm, baseline covariates outcomes: person_id, event_date for first endpoint censor : person_id, censor_date for...

import numpy as np
import pandas as pd
import statsmodels.api as sm

HORIZON_DAYS = 730

def make_itt_dataset(cohort, outcomes, censor, horizon_days=HORIZON_DAYS):
    dat = cohort.copy()
    dat["horizon_date"] = dat["index_date"] + pd.to_timedelta(horizon_days, unit="D")
    dat = dat.merge(outcomes.groupby("person_id", as_index=False)["event_date"].min(),
                    on="person_id", how="left")
    dat = dat.merge(censor[["person_id", "censor_date"]], on="person_id", how="left")
    dat["analysis_end"] = dat[["horizon_date", "censor_date"]].min(axis=1)
    dat["event"] = ((dat["event_date"].notna()) &
                    (dat["event_date"] <= dat["analysis_end"])).astype(int)
    dat["followup_days"] = (dat["analysis_end"] - dat["index_date"]).dt.days.clip(lower=0)
    return dat

def overlap_weights(dat, covariates):
    x = sm.add_constant(pd.get_dummies(dat[covariates], drop_first=True), has_constant="add")
    y = (dat["assigned_arm"] == dat["assigned_arm"].sort_values().unique()[1]).astype(int)
    ps = sm.Logit(y, x).fit(disp=False).predict(x).clip(0.01, 0.99)
    dat = dat.copy()
    dat["ps"] = ps
    dat["ow"] = np.where(y == 1, 1 - ps, ps)
    return dat

def weighted_itt_risk_difference(dat):
    risks = (dat.groupby("assigned_arm")
               .apply(lambda g: np.average(g["event"], weights=g["ow"]))
               .rename("risk"))
    return {"risk_by_arm": risks.to_dict(),
            "risk_difference": float(risks.iloc[1] - risks.iloc[0])}
r implementation

ITT-style treatment-policy dataset and overlap-weighted risk difference in R. Post-index switching or stopping is not used to reassign arms or censor follow-up.

library(data.table)

make_itt_dataset <- function(cohort, outcomes, censor, horizon_days = 730L) {
  setDT(cohort); setDT(outcomes); setDT(censor)
  ev <- outcomes[, .(event_date = min(event_date)), by = person_id]
  dat <- merge(copy(cohort), ev, by = "person_id", all.x = TRUE)
  dat <- merge(dat, censor[, .(person_id, censor_date)], by = "person_id", all.x = TRUE)
  dat[, horizon_date := index_date + horizon_days]
  dat[, analysis_end := pmin(horizon_date, censor_date, na.rm = TRUE)]
  dat[, event := as.integer(!is.na(event_date) & event_date <= analysis_end)]
  dat[, followup_days := pmax(as.integer(analysis_end - index_date), 0L)]
  dat[]
}

add_overlap_weights <- function(dat, covariates) {
  f <- as.formula(paste("I(assigned_arm == sort(unique(assigned_arm))[2]) ~",
                        paste(covariates, collapse = " + ")))
  ps <- pmin(pmax(predict(glm(f, data = dat, family = binomial()), type = "response"), 0.01), 0.99)
  dat[, ps := ps]
  dat[, ow := ifelse(assigned_arm == sort(unique(assigned_arm))[2], 1 - ps, ps)]
  dat[]
}

weighted_itt_risk_difference <- function(dat) {
  risk <- dat[, .(risk = weighted.mean(event, ow)), by = assigned_arm][order(assigned_arm)]
  list(risk_by_arm = risk, risk_difference = risk$risk[2] - risk$risk[1])
}