Events and sample size for a log-rank test
Plan the required events first, then divide by the expected event probability to find total enrollment for a two-group log-rank comparison.
Fit
When to use it, and when not to
Use it when
- You compare time to a first event in two independent groups.
- A constant hazard ratio is a reasonable planning assumption.
Not when
- Hazards vary over time or cross. Use a design-specific approach, such as simulation for the planned test. Read: Simulation-based power and sample-size planning
- You target a restricted mean survival difference. Plan specifically for that target. Read: Restricted mean survival time
Before you start
What you need
- Expected hazard ratioSupply a positive hazard ratio different from one. It describes the ratio of event rates among those still at risk.
- Overall event probabilitySupply the share expected to have the event during study follow-up, above zero and at most one.
- Allocation ratioEnter group two’s size divided by group one’s size. It defaults to one and has a lower bound of 0.05.
- Two-sided significance levelAlpha defaults to 0.05.
- Target powerPower defaults to 0.8 and is bounded between 0.5 and 0.999.
- The planning hazard ratio is constant over time.How to check: Review clinical expectations and prior survival curves. Delayed effects or crossing hazards need other planning.
- The overall event probability reflects the actual follow-up plan.How to check: Account externally for entry times, follow-up and loss to follow-up before supplying this value.
- People are independent and censoring is noninformative for the comparison.How to check: Check whether loss to follow-up relates to prognosis differently across groups.
Plain language
How it works
Schoenfeld’s approximation divides the squared sum of the significance and power normal quantiles by the allocation variance times the squared natural log hazard ratio. The allocation variance is the group-one share times the group-two share. Group one’s share is one divided by one plus the allocation ratio.
Mallard rounds the event requirement upward. It separately divides the unrounded requirement by the overall event probability and rounds enrollment upward. It does not calculate entry times or follow-up duration. Choosing a sample-size method helps distinguish event-based planning from a simple participant count.
Worked example
A worked example
- Setting
- A two-group trial plans equal allocation and one time-to-first-event outcome.
- Question
- What events and enrollment are needed for a hazard ratio of 0.7?
- Approach
- Enter hr = 0.7, eventRate = 0.4, ratio = 1, alpha = 0.05 and power = 0.8.
- Result
- Mallard returns 247 events and 617 participants in total.
- What it means
- The event probability is 40 in 100 during follow-up. Enrollment uses the unrounded event requirement, so dividing the printed event count can differ.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
The Schoenfeld calculation assumes proportional hazards. Total enrollment depends on the supplied overall event probability; Mallard does not model accrual or censoring to estimate it.
- Treating everyone enrolled as an event.Instead: Use the overall event probability to convert events to enrollment.
- Supplying a hazard rate as the event probability.Instead: Supply a probability over the planned study follow-up.
- Claiming the app calculated follow-up duration.Instead: Determine the event probability externally; this route takes it as an input.
Inside Mallard
How Mallard uses this
Mallard returns rounded required events, total enrollment and approximate power at a supplied total. Enrollment uses the unrounded event requirement.
analysis.logrank_sample_size, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Sample-size formula for the proportional-hazards regression model (opens in a new tab) · Biometrics
- Evaluation of survival data and two new rank order statistics arising in its consideration (opens in a new tab) · Cancer Chemother Rep