Log-rank test
Determines the sample size required to detect a specified difference between the survival distributions of two groups using the log-rank test.
Key takeaways
- What is calculated: Determine the required number of events and the corresponding number of participants.
- Quantities you must supply: Median survival — control; Median survival — treatment; Accrual period; Additional follow-up after accrual; Significance level; Power; Allocation ratio.
- Type of calculation: Power-based: it answers how much data is needed to detect a stated effect. Power 0.80 at α = 0.05 is the usual target; confirmatory studies use 0.90.
- Calculation routes: 2 are available for this design; the one selected determines the formula, the quantities requested and the result.
Methods available for Log-rank test
- Median survival times with accrual and follow-up (Schoenfeld) Two-arm survival comparison specified through median survival times, accrual and follow-up. Reducing a survival design directly to a participant count without accounting for event probability is the commonest error in trial planning.
- Survival rates at the end of the study (Machin / Freedman) Sample size for a two-arm survival comparison stated through the survival rate expected in each group. Survival rates at a stated time are how clinical assumptions are usually available. Converting them by hand into a hazard ratio and an event probability is where planning errors creep in.
When to use
Use when the primary objective is to determine whether the time-to-event or survival experience differs between two groups.
Sample size
Awaiting inputs
—
Set the parameters and calculate.
Methodology — Log-rank test — Schoenfeld formula with exponential survival
Formula used Log-rank test — Schoenfeld formula with exponential survival
- Two-sided alternative selected: α is split between both tails, so the larger quantile is used and the requirement rises
where —
- m₁
- Median survival in the control arm. > 0
- m₂
- Median survival in the treatment arm; HR = m₁/m₂. Must differ from m₁
- a
- Recruitment period, with uniform entry assumed. ≥ 0
- f
- Additional follow-up after the last subject enters. ≥ 0
- α
- Probability of rejecting a true null hypothesis (Type I error). 0.0001 – 0.5; conventionally 0.05, or 0.025 one-sided for regulatory non-inferiority
- 1 − β
- Probability of rejecting the null hypothesis when the specified alternative is true. 0.50 – 0.9999; conventionally 0.80 or 0.90
- k
- Allocation ratio n₂/n₁. 0.05 – 20; 1 gives equal groups
- ℓ
- Expected proportion of enrolled units lost before analysis. 0 – 0.95
Formulas for the 2 methods
| Calculation method | Formula |
|---|---|
| Median survival times with accrual and follow-up (Schoenfeld) | |
| Survival rates at the end of the study (Machin / Freedman) |
How this method works
Power for the log-rank test depends on the number of events, not the number of subjects. The required events follow from the hazard ratio; subjects follow by dividing by the probability of experiencing an event, computed here from exponential survival under uniform accrual.
Selected method - median survival with accrual and follow-up (Schoenfeld). Power depends on the number of events, not the number of subjects. Schoenfeld's result gives the events required; subjects follow by dividing by the probability of experiencing an event, computed from the median survival times with uniform accrual plus additional follow-up.
A trial short of events can be rescued by recruiting more subjects or by extending follow-up. The latter is usually cheaper, with diminishing returns once most subjects have had an event.
Null hypothesis. H0: HR = 1 — the two survival distributions are equal.
Alternative hypothesis. Two-sided H1: HR != 1. One-sided H1: HR < 1 or HR > 1.
Calculation procedure
- State the median survival expected in each arm and convert to hazard rates: .
- The hazard ratio follows as .
- Compute the events required: .
- Work out the probability an enrolled subject has an event, given the accrual period and the follow-up after it, and divide: .
- Round each arm up, then inflate for dropout. Longer follow-up raises the event probability and lowers the enrolment needed.
Exact or approximate
Approximate — an asymptotic result for the log-rank statistic, standard in trial practice.
The formula shown always matches what was computed: when a one-sided test is selected the rendered quantile changes from z1−α/2 to z1−α, and where several methods exist, the formula follows the method selected in the calculator.
Advantages & limitations
Advantages
- Reports events and participants separately.
- Accounts for accrual and follow-up explicitly.
- The standard method reviewers expect.
Limitations
- Assumes proportional hazards and exponential survival.
- Sensitive to the hazard ratio near the null: moving from 0.80 to 0.75 cuts required events by about a third.
- Does not model loss to follow-up; use the Lakatos method for that.
Assumptions
- Hazards are proportional over the whole follow-up period.
- Survival is exponential, so a constant hazard applies within each arm.
- Accrual is uniform over the recruitment period.
- Censoring is non-informative.
Applicable adjustments
Supports allocation ratio and dropout inflation.
Conclusion
Report required events, participants per arm, and the assumed medians, accrual and follow-up. Extending follow-up is usually cheaper than recruiting, with diminishing returns once most subjects have had an event.
References
- Schoenfeld DA. Sample-size formula for the proportional-hazards regression model. Biometrics. 1983;39(2):499–503. Link
- Collett D. Modelling Survival Data in Medical Research. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2015.
- Machin D, Campbell MJ, Tan SB, Tan SH. Sample Size Tables for Clinical Studies. 3rd ed. Chichester: Wiley-Blackwell; 2009.
- MedCalc Software Ltd. Sample size calculation: survival analysis (log-rank test). Link