Statistical Calculators › Survival Analysis › Non-Inferiority Test for Survival (Hazard Ratio Margin)
← All Calculators

Survival Analysis

Non-Inferiority Test for Survival (Hazard Ratio Margin)

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.

Study Design

Higher hazards are assumed to be worse, so the non-inferiority hypothesis is H0: HR ≥ HR0 versus Ha: HR < HR0.
Upper hazard-ratio boundary considered clinically acceptable.
Hazard ratio at which the desired power is calculated.
Proportion randomized to the control group.
Calculated as 1 − P1.

Sample Size Results

Event-driven calculation using the Cox proportional-hazards non-inferiority formulation.
Enter study assumptions and click Calculate Sample Size.

Methodology

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.

Required Number of Events

Let P1 and P2 be the proportions assigned to control and treatment, respectively, with P1 + P2 = 1. The required total number of events is

D = [z1−α + zpower]2 / {P1P2 [log(HR1) − log(HR0)]2}

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.

Converting Events to Subjects

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:

d = P1Pev1 + P2Pev2
N = ceil(D / d)

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.

Worked Validation Example

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.

P1 = 0.50    P2 = 0.50
Pev1 = 0.50    Pev2 = 0.30
HR0 = 1.20    HR1 = 0.50
α = 0.025    Power = 0.90

D = 54.8372 expected events
d = 0.50(0.50) + 0.50(0.30) = 0.40
N = ceil(54.8372 / 0.40) = 138
N1 = 69    N2 = 69
Expected events = 55.20

The implementation reproduces the Published worked example: total N = 138, with 69 subjects in each group and 55.2 expected events.

References

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.