- Introduced by
- Conceptual basis: Kaplan & Meier (1958); risk-adjustment via IPTW formalised by Hernán, Brumback & Robins (2001), with practical implementation by Cole & Hernán (2004)
- Year
- 2001–2004 (formal statistical framework for weighted KM curves)
- Type
- Adjusted non-parametric survival method
- Family
- Clinical / epidemiology
What does it do?
Risk-adjusted Kaplan-Meier analysis combines the non-parametric Kaplan-Meier estimator with inverse probability of treatment weighting (IPTW) or similar risk-adjustment procedures to produce survival curves that are comparable across groups as if the groups had identical distributions of baseline confounders.
It is the observational-study analogue of plotting survival curves from a randomised trial.
The intuition behind the method
Standard Kaplan-Meier curves compare raw observed survival between groups, but in observational data the groups often differ systematically: sicker patients may receive one treatment while healthier patients receive another. Risk-adjusted Kaplan-Meier addresses this by giving more weight to patients who were unlikely to receive the treatment they actually received, and less weight to those who were likely to receive it, given their baseline covariates. After weighting, the groups resemble a single population in which treatment assignment was unrelated to measured baseline risk. The resulting curves describe what survival would look like in that pseudo-population.
History
The Kaplan-Meier estimator was introduced by Edward Kaplan and Paul Meier in their 1958 paper in the Journal of the American Statistical Association, providing a non-parametric method for estimating survival functions in the presence of censoring. Adjusted survival curves were long produced with parametric models or with stratified Kaplan-Meier curves limited to a few covariate strata. Hernán, Brumback, and Robins (2001) introduced marginal structural models estimated with inverse-probability-of-treatment-weighted estimators; their abstract concerns marginal structural Cox models for time-varying treatments and does not address weighted Kaplan-Meier curves. The use of such weights to produce adjusted Kaplan-Meier survival curves, as described here, is a later application of that framework.
When to use it
Use risk-adjusted Kaplan-Meier when you have time-to-event data from an observational study or a non-randomised database, want to compare survival between groups while adjusting for measured baseline confounders, and want population-level (marginal) curves rather than curves specific to one covariate pattern. It is especially relevant when covariate distributions differ markedly between groups. Do not rely on it if positivity fails, that is, if some covariate combinations occur only in one treatment group, because the required weights then become extreme or undefined. It is also not a sufficient primary analysis when important confounders are unmeasured, since weighting corrects only for observed confounding. When few events occur in either group, the weighted curves can be unstable, and a Cox model may be the better choice for those data.
Limitations and considerations
- Relies on the assumption of no unmeasured confounding; unmeasured variables that simultaneously drive treatment selection and the outcome cannot be adjusted away by weighting.
- Extreme or highly variable weights, which arise when the positivity assumption is nearly violated, inflate variance and can make the curves unreliable; weight trimming or truncation introduces its own bias.
- Greenwood confidence intervals do not account for uncertainty in the estimated weights and are typically too narrow when weights vary substantially, so robust or bootstrap intervals are needed, which adds computational complexity.
- The method adjusts only for baseline confounders; when confounders change over time and are affected by earlier treatment, marginal structural models with time-varying weights are needed.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Provides intuitive, visually interpretable survival curves that are directly comparable across groups after confounding adjustment.
- The adjusted curves do not assume proportional hazards and remain valid when the hazard ratio changes over time; a weighted Cox hazard ratio used to summarise the comparison, however, does assume proportional hazards.
- Produces marginal structural estimates (what would happen at the population level) rather than conditional estimates that apply only to a specific covariate pattern.
- Can be combined with robust variance estimation or bootstrapping to give honest confidence intervals that account for weight variability.
- Flexible: weights can be derived from logistic regression, boosting, random forests, or targeted maximum likelihood estimation.
Applications
- Comparing long-term survival after two surgical procedures or drug treatments in registry or electronic health record data, adjusting for differences in patient severity at baseline.
- Estimating marginal survival curves in comparative effectiveness research where randomisation is not possible and treatment choice follows clinical indication.
- Post-marketing pharmacovigilance studies comparing time to an adverse event between drug-exposed and unexposed cohorts drawn from healthcare databases.
- Cancer registry analyses comparing survival by tumour subtype or treatment centre after accounting for differences in age, stage, and comorbidity distributions.
- Health technology assessment submissions in which unadjusted registry curves would be misleading because treatment assignment is confounded by indication.
How it works
How it works
Identify all measured baseline covariates that are potential confounders, meaning variables that predict both the treatment received and the time-to-event outcome. This choice depends on subject-matter knowledge rather than on the data alone. Omitting an important confounder leaves the adjustment incomplete.
Estimate, for each patient, the probability of receiving the treatment they actually received, conditional on their baseline covariates. This is typically done with a logistic regression or a more flexible machine-learning model. The raw IPTW weight is the inverse of this probability, so patients whose observed treatment was unlikely given their covariates receive large weights.
Compute stabilised weights by multiplying each raw weight by the marginal (unconditional) probability of the treatment actually received, which is equivalent to dividing that marginal probability by the conditional probability given covariates. Stabilised weights reduce the influence of extreme values relative to raw weights and tend to keep the total weight near the original sample size, which improves precision and numerical stability.
Apply the weighted Kaplan-Meier estimator, in which the event and at-risk counts at each failure time are replaced by sums of the IPTW weights for patients with events and for patients still under follow-up, respectively. This is done separately for each treatment group, giving one marginal survival curve per group.
Formula
\hat{S}(t) = \prod_{t_j \le t} \left(1 - \frac{\sum_i w_i d_{ij}}{\sum_i w_i r_{ij}}\right)Construct confidence intervals with a robust variance estimator, such as the sandwich estimator, or with a non-parametric bootstrap that repeats the weight estimation in each resample. Greenwood-formula intervals do not account for uncertainty in the estimated weights, so they are typically too narrow when the weights vary substantially.
Compare the adjusted curves visually and formally, using a weighted log-rank test or a weighted Cox model that yields a marginal hazard ratio. The weighted Cox hazard ratio summarises the comparison only if proportional hazards hold, so check that assumption when this model is used; the adjusted curves themselves do not require it. Report the effective sample size after weighting, and inspect the weight distribution for extreme values, since large weights are the practical sign that the positivity assumption may be strained.
Common pitfalls
- Omitting important confounders from the weight model. A variable that predicts both treatment received and survival, but is left out of the weight model, leaves residual confounding, so the adjusted curves still reflect bias.
- Using raw (unstabilised) weights without checking their distribution. A few very large weights can dominate the estimate and inflate variance; inspect the weight distribution and consider stabilised or trimmed weights, reporting trimming as a sensitivity analysis.
- Applying Greenwood formula confidence intervals. These ignore variability in the estimated weights and are typically too narrow when weights vary substantially; use a robust sandwich variance or bootstrap instead.
- Claiming causal conclusions without stating the assumptions. Adjusted curves support causal interpretation only under no unmeasured confounding, consistency, positivity, and non-informative censoring; these assumptions need to be stated and defended, and the data should be checked against them.
- Ignoring informative censoring. The Kaplan-Meier estimator, and its weighted version, assume that censoring is independent of the event time given the covariates used in the weights. Baseline weighting does not correct for informative censoring. If censoring depends on prognosis, model it separately, for example with inverse probability of censoring weights, and report this as part of the analysis.
Frequently asked questions
What is the difference between risk-adjusted Kaplan-Meier and a stratified Kaplan-Meier?
Stratified Kaplan-Meier plots separate curves by discrete covariate levels (for example, sex or age group), but it cannot adjust for many variables at once and does not produce a single summary curve per treatment arm. Risk-adjusted Kaplan-Meier uses IPTW to account for the full covariate distribution in one weighted estimator, yielding one marginal curve per treatment group that reflects the overall population.
Can I use propensity score matching instead of IPTW for adjusted Kaplan-Meier curves?
Yes. With matching, standard Kaplan-Meier curves are estimated in the matched sample. The population that the resulting curves describe depends on the matching method and on which patients remain after matching, so the target population should be stated explicitly. IPTW uses the full sample with weights. Both are valid approaches, and the choice depends on the estimand of interest and on whether discarding unmatched patients is acceptable.
How do I know if my weights are too extreme?
Examine the distribution of the stabilised weights. A small number of very large weights relative to the rest indicates near-violations of positivity and can severely inflate variance. Check the effective sample size after weighting and be cautious when it falls well below the original sample size. Trimming weights at the 1st and 99th percentiles is a common pragmatic remedy, but it introduces bias and should be reported as a sensitivity analysis.
Is a weighted log-rank test valid for comparing the adjusted curves?
A weighted log-rank test can be used, but it needs a robust variance estimator to account for the variability in the estimated weights. Standard log-rank software that ignores weighting gives incorrect p-values. Alternatively, a weighted Cox model provides a formal test of the marginal hazard ratio while accounting for weight uncertainty through robust standard errors.
Does risk-adjusted Kaplan-Meier handle time-varying confounders?
Standard risk-adjusted Kaplan-Meier adjusts only for baseline confounders measured before treatment initiation. When confounders change over time and are affected by prior treatment, time-varying IPTW within the marginal structural model framework is needed. This is a substantially more complex extension than the baseline-adjusted approach.
Related methods
Sources
Cole, S. R., & Hernan, M. A. (2004). Adjusted survival curves with inverse probability weights. Computer Methods and Programs in Biomedicine, 75(1), 45–49.
Open DOI referenceHernan, M. A., Brumback, B., & Robins, J. M. (2001). Marginal structural models to estimate the joint causal effect of nonrandomized treatments. Journal of the American Statistical Association, 96(454), 440–448.
Open DOI reference