Survival Analysis
Sample size and event requirements for a two-group non-inferiority survival study analyzed with a Cox proportional hazards model (or equivalent non-inferiority logrank test). Specify the hazard-ratio margin, anticipated hazard ratio, event probabilities, allocation, power, and one-sided alpha.
This calculator uses the sample-size formulation for a non-inferiority comparison of two survival curves under a Cox proportional hazards model. The treatment-to-control hazard ratio is HR = h2/h1. When lower hazards are better and the non-inferiority margin is HR0 > 1, the hypotheses are H0: HR ≥ HR0 versus Ha: HR < HR0.
The method assumes proportional hazards, meaning that the hazard ratio remains constant over time even though the underlying hazard rates may vary. This method uses this Cox-model procedure as equivalent, for power and sample size purposes, to the corresponding non-inferiority logrank test.
Let P1 and P2 be the proportions assigned to control and treatment, respectively, with P1 + P2 = 1. The required total number of events is
Equivalently, the denominator contains [log(HR1/HR0)]2. The calculation therefore depends on the separation between the anticipated hazard ratio and the non-inferiority margin on the log-hazard scale.
Because survival-trial power is fundamentally driven by the number of observed events, the required number of events is converted to an enrollment target using the allocation-weighted event probability:
The resulting total sample size is then allocated between the two groups. Expected event counts are reported as N1Pev1 and N2Pev2.
Interpretation: The calculator is specifically for the Cox proportional-hazards/non-inferiority hazard-ratio formulation. It does not model accrual time, administrative follow-up, staggered entry, dropout, or non-proportional hazards directly. Those design features can materially affect the number of subjects needed to obtain the required number of events.
the relevant methodological literature provides a directly corresponding example: 90% power, one-sided alpha = 0.025, equal allocation, control event probability = 0.50, treatment event probability = 0.30, HR0 = 1.20, and HR1 = 0.50.
The implementation reproduces the Published worked example: total N = 138, with 69 subjects in each group and 55.2 expected events.
Chow, S.C., Shao, J., & Wang, H. (2008). Sample Size Calculations in Clinical Research, 2nd Edition. Chapman & Hall/CRC.
Schoenfeld, D.A. (1983). “Sample-size formula for the proportional-hazards regression model.” Biometrics, 39(2), 499–503.
the software/this method, Chapter 731: Non-Inferiority Tests for Two Survival Curves using Cox's Proportional Hazards Model. the relevant methodological literature identifies the procedure, gives the non-inferiority hypotheses and power formulation, and provides the worked validation example used above.