lifelines-hc: Higher Criticism testing for sparse non-proportional hazard departures in Python
Alon Kipnis, Ben Galili, Zohar Yakhini
Key points
From the paper's conclusion- We introduce lifelines-hc, a Python package extending the lifelines survival library with the HCHG test: Higher Criticism applied to per-interval hypergeometric p-values.
Abstract
The log-rank test is the standard tool for two-sample survival comparison and has good power against proportional-hazards alternatives, but it loses power against sparse hazard departures, in which the hazard difference is concentrated in a small number of time intervals whose locations along the follow-up are unknown a priori (Kipnis, Galili and Yakhini, Biometrika 2026). Weighted log-rank tests -- Gehan-Wilcoxon, Tarone-Ware, Peto-Prentice, Fleming-Harrington -- each impose a pre-specified temporal emphasis. Combination procedures such as MaxCombo and the Yang-Prentice short-term/long-term hazard-ratio model relax that choice, but still scan only a small dictionary of global temporal shapes and remain insensitive to sparse departures occurring outside them. We introduce lifelines-hc, a Python package extending the lifelines survival library with the HCHG test: Higher Criticism applied to per-interval hypergeometric p-values. HCHG applies to right-censored two-sample data and detects sparse hazard departures at unknown locations without committing to any temporal pattern. Across four clinical case studies -- CheckMate 057 PFS (n=582), COMET-1 OS (n=1028), AZURE DFS (n=3359), and the Copenhagen Study Group for Liver Diseases cirrhosis trial (n=446, fully public individual patient data) -- HCHG achieves p <= 0.014 in every dataset, while the log-rank test is non-significant throughout (p >= 0.26). MaxCombo and the Yang-Prentice adaptive log-rank test detect the delayed-benefit crossing in CheckMate 057 (p < 0.001) but are non-significant on the remaining three (p >= 0.24), where the departure is sparse or multi-window rather than a smooth short-term/long-term hazard-ratio pattern. lifelines-hc is freely available under the MIT license at https://github.com/alonkipnis/lifelines-hc and via pip install lifelines-hc.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A Flexible Test for Comparing Two Hazard Rate Functions With Arbitrary Differences.Statistics in medicine · 2026
- What Survival Benchmarks Don't Tell You: Impact of Model Selection and Dataset RegimesarXiv · 2026
- A High Performance Cox Proportional Hazards Model for Large Scale Survival Analysis.Biomedical physics & engineering express · 2026
- A Hierarchical Bayesian Cox Model with Variational Inference for High-Dimensional Survival AnalysisMathematics · 2026
- Cure-Fraction Random Survival Forests: Separating Cure from LatencyarXiv · 2026
- Alternatives to the Cox proportional hazards model: A review of additive hazards and accelerated failure time modelsStatistica Neerlandica · 2026