Tutorials › Propensity Score Matching and Instrumental Variables › Propensity Score Matching For A Time-To-Event Outcome

Worked Examples · Tutorial 683 of 699

Propensity Score Matching For A Time-To-Event Outcome

Learn how to analyze and interpret survival in a propensity-score-matched cohort without treating censored observations as event-free outcomes.

Intermediate 13 min read

What You'll Learn

  • Define a survival contrast for the retained matched population.
  • Assess post-match balance using standardized mean differences.
  • Calculate Kaplan–Meier survival estimates with events and right-censoring.
  • Interpret a prespecified difference in survival at a fixed time.
  • Distinguish marginal from covariate-conditional independent censoring.
  • Choose an analysis that respects matching and censoring.

Why Survival Outcomes Need Special Handling

A matched cohort can have a time-to-event outcome, such as time to hospitalization or death, but some people will leave observation before experiencing the event. Their event time is right-censored: we know they remained event-free up to their censoring time, but not what happened afterward. Counting them as if they had no event by the end of follow-up generally gives the wrong survival estimate.

The analysis also needs to preserve what the matching design targets. A survival contrast in the retained matched cohort is not automatically an effect for every person in the source population. Before calculating a curve or contrast, specify the target population, event, time origin, and follow-up horizon. In the worked examples below, the target is the retained set of equally weighted matched pairs, and the contrast is the difference in survival probability at 6 months.

Definition: Let \(T\) be time from a specified origin to the event, and let \(C\) be time to censoring. The observed time is \(Y=\min(T,C)\), and the event indicator is \(\Delta=I(T\le C)\). The survival function under treatment level \(a\) is \(S_a(t)=P(T^a>t)\), where \(T^a\) is the potential event time under \(a\). A time-specific survival difference is \(S_1(t)-S_0(t)\); it is measured in probability units, or percentage points when multiplied by 100.

The target population must be made explicit in the notation. For a retained matched cohort, one can define \(S_a(t)\) within that target population. If matching retains treated individuals and selects comparable controls, the target may instead be the retained treated population; the controls then need to represent that target through the matching design and any required weights. The example here uses one treated and one control person per retained pair, with each pair given equal weight.

Assumptions for a Causal Interpretation

A matched comparison of observed survival curves is descriptive unless the design and analysis support a causal interpretation. The usual causal conditions include consistency (the observed outcome under received treatment agrees with the corresponding potential outcome), no interference between individuals, and conditional exchangeability given the measured baseline covariates used to justify treatment comparability. There must also be adequate treatment overlap in the target population: individuals represented in the matched analysis need a realistic chance of receiving either treatment at their covariate values. Matching can improve comparability on measured variables, but it cannot establish exchangeability for unmeasured confounders.

Survival estimation has an additional assumption about censoring. For an unadjusted Kaplan–Meier curve within each treatment group to estimate that group’s marginal survival curve, censoring must be independent of event time marginally within that group in the matched target population. If censoring is independent only conditional on covariates, that alone does not justify an unadjusted curve: the covariate distribution among those still at risk may change over time. Use an estimator that accounts for those covariates, such as appropriate stratification or inverse-probability-of-censoring weighting.

Key condition: Kaplan–Meier estimation handles right-censoring under an independent-censoring condition; it does not make informative censoring harmless. The condition must apply to the estimator actually used. Marginal independence supports an unadjusted group-specific curve; conditional independence requires an analysis that accounts for the conditioning variables.

Kaplan–Meier Estimation and Its Justification

At each distinct event time \(t_j\), let \(n_j\) be the number still at risk immediately before that time and \(d_j\) the number of events at that time. The Kaplan–Meier estimator multiplies the estimated conditional probability of surviving each event time. A person censored before a later event time leaves the risk set from then on; censoring is not counted as an event.

$$ \widehat S(t)=\prod_{t_j\le t}\left(1-\frac{d_j}{n_j}\right) $$

The product follows from the chain rule for conditional probabilities. Survival through \(t\) is the product of surviving each successive event time, conditional on having survived to just before it. At \(t_j\), the observed fraction surviving that event time is \(1-d_j/n_j\). Under independent censoring, those still observed at risk provide information about survival for the group at risk; multiplying these conditional estimates gives the product-limit estimate. Censoring times reduce later risk sets but contribute no event factor.

Worked Example: Checking Balance Before Comparing Survival

Suppose 100 treated people and 100 controls were matched one-to-one without replacement. In this hypothetical cohort, the mean baseline age is 58 years (standard deviation 10 years) among treated people and 57 years (standard deviation 9.5 years) among controls. Before matching, the age standardized mean difference was 0.42. Calculate the post-match age standardized mean difference and assess the result.

For a continuous covariate, divide the difference in means by the pooled within-group standard deviation:

$$ s_{\mathrm{pool}}=\sqrt{\frac{10^2+9.5^2}{2}} =\sqrt{95.125}=9.753\text{ years} $$

Thus the standardized mean difference is:

$$ \mathrm{SMD}_{\mathrm{age}}= \frac{58-57}{9.753}=0.1025 $$

The post-match absolute difference is about 0.103 standard deviations, smaller than the pre-match value of 0.42. That indicates improved balance on age, but it does not establish balance on every measured covariate or remove possible unmeasured confounding. Balance should be checked across the covariates relevant to treatment assignment and outcome, not inferred from a single variable or a nonsignificant baseline test.

Worked Example: A Prespecified Six-Month Survival Difference

Consider six equally weighted matched pairs in a hypothetical cohort. Each person is followed from treatment initiation; event times are in months. The table lists the observed time and whether it is an event or a censoring time. The prespecified contrast is treated minus control survival at 6 months.

GroupObserved times and status (months)
Treated2 event; 4 event; 5 censored; 6 event; 7 censored; 8 event
Control3 event; 4 censored; 5 event; 6 censored; 7 event; 9 event

For treated participants, there are 6 at risk at month 2, then 5 at risk at month 4. One person is censored at month 5, leaving 3 at risk immediately before the event at month 6. Therefore:

$$ \widehat S_1(6)= \left(\frac{5}{6}\right) \left(\frac{4}{5}\right) \left(\frac{2}{3}\right) =\frac{4}{9}=0.4444 $$

For controls, the event at month 3 leaves 5 at risk; censoring at month 4 leaves 4 at risk before the event at month 5. Censoring at month 6 does not change the survival estimate at that time. Thus:

$$ \widehat S_0(6)= \left(\frac{5}{6}\right) \left(\frac{3}{4}\right) =\frac{5}{8}=0.6250 $$

The estimated difference is:

$$ \widehat S_1(6)-\widehat S_0(6) =0.4444-0.6250=-0.1806 $$

In this hypothetical matched cohort, estimated 6-month survival is 18.1 percentage points lower in the treated group than in the control group. This is a point estimate, not proof of a treatment effect. Its causal interpretation depends on the design and exchangeability conditions, and its uncertainty depends on the matched structure as well as the event and censoring information. In particular, a control censored at month 6 is known to have been event-free up to censoring; it is not known to have survived beyond that point.

When Censoring Depends on Covariates

A common diagnostic question is whether censoring could depend on a prognostic variable. Suppose that, within treatment group, censoring is independent of event time after conditioning on a baseline risk category, but high-risk people are censored more often than low-risk people. The people remaining under observation will then become disproportionately low-risk. An unadjusted Kaplan–Meier curve combines the changing risk-set composition with event experience and need not estimate the marginal survival curve for the original matched target population.

One solution is to estimate survival separately within the relevant risk categories and standardize the resulting category-specific estimates to the target population’s baseline category distribution. This requires adequate data in each category and appropriate independent-censoring assumptions within categories. Another option is inverse-probability-of-censoring weighting, which gives greater weight to observed individuals who represent similar individuals no longer observed. That approach requires a suitable model for remaining uncensored, adequate probability of continued observation, and correct implementation. Neither method repairs unmeasured confounding of treatment and outcome.

Worked Example: Standardizing Conditional Survival Estimates

Suppose the target matched population is 50% high-risk and 50% low-risk at baseline. In a hypothetical analysis that accounts for risk category, the estimated 12-month survival probabilities are 0.60 and 0.90 for treated high-risk and low-risk participants, respectively, and 0.70 and 0.95 for controls. Assume the censoring condition is considered plausible within each risk category. Standardize both groups to the stated target distribution.

For the treated group, the standardized survival estimate is:

$$ \widehat S_1(12)=0.50(0.60)+0.50(0.90)=0.75 $$

For controls, it is:

$$ \widehat S_0(12)=0.50(0.70)+0.50(0.95)=0.825 $$

The standardized 12-month survival difference is \(0.75-0.825=-0.075\), or 7.5 percentage points lower survival in the treated group. Standardizing uses the same baseline risk-category mix for both groups; it is therefore not simply the crude average of whoever remains uncensored at 12 months. This calculation is appropriate only if the category-specific estimates and target weights correspond to the intended matched population.

Diagnostics, Alternatives, and Limitations

Before interpreting a survival contrast, examine the matching and follow-up data together. A balance table or plot should show covariate differences after matching; standardized mean differences are generally more informative for balance than baseline significance tests. Inspect numbers at risk over time, event counts, censoring patterns by treatment and key covariates, follow-up duration, and whether censoring or loss to follow-up differs in ways that make the chosen estimator implausible. Very small risk sets at the prespecified horizon make the estimate unstable, even if the curve can still be drawn.

The time-specific survival difference answers a direct question about the probability of remaining event-free at one chosen time. A log-rank test instead assesses evidence of a difference across the observed follow-up in a particular weighted sense; it does not by itself give the size of a clinically meaningful difference at a chosen time. A Cox proportional-hazards model summarizes a comparison with a hazard ratio and requires proportional hazards for a constant hazard-ratio interpretation. A hazard ratio is not a risk difference or a ratio of survival probabilities. Restricted mean survival time is another alternative: it compares average event-free time up to a chosen horizon and can be useful when a single hazard ratio is not a suitable summary.

Because observations in a matched set are related by design, uncertainty calculations should respect the matched sets. For example, resampling whole matched pairs rather than individual people preserves the pair structure in a bootstrap analysis. With matching with replacement, controls reused across sets also create dependence that must be handled. A numerical confidence interval should be based on a variance or resampling method appropriate to the design and estimator; ordinary independent-group calculations may understate or otherwise misrepresent uncertainty. The six-pair example is intentionally descriptive and too small to support reliable population-level inference.

Common mistake: “A participant censored before 6 months had no event by 6 months, so count that person as event-free at 6 months.” This treats unknown post-censoring event status as known and can bias the survival estimate. Kaplan–Meier uses that participant’s known event-free time to contribute to earlier risk sets, then removes the participant from later risk sets. If censoring is informative for the estimator being used, changing the risk-set calculation alone is not enough; use an analysis that accounts for the relevant covariates or otherwise justifies the censoring assumption.

The main limitations remain substantive as well as statistical. Matching does not balance variables that were not measured or not adequately represented in the matching procedure; poor overlap can exclude people and narrow the population to which the result applies. Survival estimates depend on the definition of time zero, event ascertainment, censoring assumptions, and the chosen horizon. A single survival contrast may conceal differences earlier or later in follow-up. Report the target population, matching details, outcome and censoring definitions, balance diagnostics, estimator, time horizon, and uncertainty method so readers can judge what the result does and does not support.

Check Your Understanding

Answer the questions, then compare your reasoning with the solutions below.

  1. In a matched cohort, what does a treated-minus-control survival difference of \(-0.08\) at 12 months mean in context?
  2. At an event time, 20 people are at risk and 3 experience the event. What is the Kaplan–Meier factor for that event time?
  3. Why does independent censoring conditional on a covariate not automatically justify an unadjusted Kaplan–Meier curve?
  4. What is one reason to use restricted mean survival time or a prespecified survival probability rather than reporting a Cox hazard ratio alone?

Solutions. (1) Estimated 12-month survival is 8 percentage points lower in the treated group than the control group in the stated matched target population; causal interpretation requires the design and analysis assumptions. (2) The factor is \(1-3/20=17/20=0.85\). (3) If the covariate predicts the event and affects censoring, the covariate mix among those still at risk can change; the pooled unadjusted curve may not estimate marginal survival. Use an analysis that accounts for the covariate, such as suitable stratification or censoring weights. (4) A hazard ratio is a relative hazard summary and, for a constant interpretation, relies on proportional hazards. A survival probability difference directly describes survival at a clinically selected time, while restricted mean survival time compares average event-free time up to a horizon.

Clinical Biostats