Tutorials › Biostatistics › Sample Size for Survival Endpoints (Log-Rank Test)

Survival Analysis & Clinical Trial Design

Sample Size for Survival Endpoints (Log-Rank Test)

A practical guide to calculating sample size for time-to-event endpoints using the log-rank test, including hazard ratios, required events, allocation ratios, event proportions, accrual and follow-up, dropout, and a complete worked clinical trial example.

Advanced 18 min read

What You'll Learn

  • Why survival sample size is fundamentally driven by the number of events
  • How the hazard ratio determines the required number of events
  • How allocation ratio affects statistical information
  • How to convert required events into total randomized sample size
  • How accrual, follow-up, censoring, and dropout affect sample size
  • How to implement the calculation in R and interpret the result

Introduction

Many clinical trials are designed around a time-to-event endpoint rather than a binary endpoint measured at a single fixed time.

Examples include:

  • Overall survival
  • Progression-free survival
  • Disease-free survival
  • Event-free survival
  • Time to treatment failure
  • Time to recurrence
  • Time to cardiovascular or other clinical events

Unlike a simple comparison of proportions, survival studies must account for the fact that patients may experience the event at different times and that some patients may be censored before experiencing the event.

The most important consequence for sample-size planning is: survival trials are usually driven by the number of events rather than simply by the number of randomized patients.

Key idea: For a two-group survival comparison using the log-rank test, the first quantity to determine is usually the required number of events. The required number of patients is then obtained by considering the proportion of randomized patients expected to experience the event during the study.

The Log-Rank Test

The log-rank test is one of the standard methods for comparing survival distributions between two treatment groups.

At each observed event time, the test compares the number of events observed in each treatment group with the number expected under the null hypothesis of equal survival distributions.

The information accumulates across all observed event times.

The null hypothesis is typically expressed as:

\[ H_0:S_1(t)=S_0(t)\quad\text{for all }t \]

Under a proportional-hazards framework, the corresponding hypothesis can be expressed in terms of the hazard ratio:

\[ H_0:HR=1 \]

where the hazard ratio compares the instantaneous event rates between the two groups.

Why Survival Sample Size Is Event-Driven

Suppose two trials each randomize 400 patients.

In the first trial, 280 patients experience the primary event during the analysis period. In the second trial, only 120 patients experience the event.

The two studies do not contain the same amount of statistical information for the log-rank comparison.

The first study has substantially more event information.

Important distinction: In a survival study, 400 randomized patients does not automatically mean that the study has 400 observations contributing event information. Patients who remain event-free at the analysis cutoff are censored and contribute follow-up information, but they do not contribute an observed event.

The Hazard Ratio

The usual effect-size parameter for a proportional-hazards survival analysis is the hazard ratio:

\[ HR=\frac{h_1(t)}{h_0(t)} \]

where:

  • \(h_1(t)\) is the hazard in the experimental group.
  • \(h_0(t)\) is the hazard in the control group.

Under proportional hazards, the ratio is assumed to be approximately constant over time.

Interpretation depends on which group is placed in the numerator.

Hazard Ratio Interpretation
\(HR=1.00\) No hazard difference
\(HR=0.90\) 10% lower hazard in the experimental group
\(HR=0.75\) 25% lower hazard
\(HR=0.70\) 30% lower hazard
\(HR=0.50\) 50% lower hazard

For a beneficial treatment where lower hazard is better, the alternative hazard ratio is generally less than 1.

Do not choose the hazard ratio simply because it produces a convenient sample size. The assumed hazard ratio should represent a clinically meaningful treatment effect that the study is designed to detect.

The Schoenfeld Event Formula

For a two-arm study with equal randomization, a commonly used large-sample approximation for the number of required events is:

\[ D = \frac{ 4\left(z_{1-\alpha/2}+z_{1-\beta}\right)^2 }{ \left[\log(HR)\right]^2 } \]

where:

  • \(D\) = required total number of events
  • \(\alpha\) = two-sided type I error
  • \(\beta\) = type II error
  • \(1-\beta\) = desired power
  • \(HR\) = hazard ratio to be detected
  • \(z_q\) = \(q\)-th standard normal quantile

The formula is often associated with the Schoenfeld approximation for proportional-hazards analyses.

Why the Logarithm of the Hazard Ratio Appears

The hazard ratio itself is not the parameter that enters the asymptotic normal approximation directly.

The proportional-hazards model is usually written in terms of the log hazard ratio:

\[ \beta=\log(HR) \]

If:

\[ HR=1 \]

then:

\[ \log(HR)=0 \]

and an infinite number of events would theoretically be required to detect an effect of exactly zero.

As the hazard ratio moves farther from 1, the absolute value of \(\log(HR)\) becomes larger and the required number of events decreases.

Two-Sided Versus One-Sided Testing

The formula depends on whether the study uses a one-sided or two-sided type I error.

For a two-sided test:

\[ z_{1-\alpha/2} \]

is used.

For a one-sided test:

\[ z_{1-\alpha} \]

is used.

Testing Strategy Critical Quantile
Two-sided \(\alpha=0.05\) \(z_{0.975}\approx1.96\)
One-sided \(\alpha=0.05\) \(z_{0.95}\approx1.645\)
Two-sided \(\alpha=0.01\) \(z_{0.995}\approx2.576\)

The choice should be specified in the protocol and statistical design, not changed after examining the data.

Power

Power is the probability of detecting the prespecified treatment effect when that effect is truly present.

\[ 1-\beta = P(\text{reject }H_0\mid HR=HR_A) \]

Common planning values include:

  • 80% power
  • 85% power
  • 90% power
  • 95% power for particularly important confirmatory settings

Higher power requires more events and therefore usually more patients.

Allocation Ratio

The simple formula above assumes equal allocation.

Let:

\[ q=\frac{n_1}{n_1+n_0} \]

represent the proportion randomized to the experimental group.

Then the general event formula is:

\[ D = \frac{ \left(z_{1-\alpha/2}+z_{1-\beta}\right)^2 }{ q(1-q)\left[\log(HR)\right]^2 } \]

For equal allocation:

\[ q=0.5 \]

so:

\[ q(1-q)=0.25 \]

and the formula reduces to:

\[ D = \frac{ 4\left(z_{1-\alpha/2}+z_{1-\beta}\right)^2 }{ \left[\log(HR)\right]^2 } \]

Why Equal Allocation Is Efficient

The term:

\[ q(1-q) \]

is maximized when:

\[ q=0.5 \]

Therefore, equal allocation generally provides the greatest statistical information per total event when the two groups have similar costs and ethical considerations.

Unequal allocation may nevertheless be appropriate because of:

  • Ethical considerations
  • Control-group availability
  • Recruitment constraints
  • Safety considerations
  • Cost differences
  • Desire for greater experience with the experimental treatment

A Complete Worked Example

Consider a randomized Phase III oncology trial comparing an experimental treatment with standard therapy.

The primary endpoint is progression-free survival.

The investigators plan a two-sided log-rank test with:

Parameter Planning Value
Primary endpoint Progression-free survival
Allocation 1:1
Hazard ratio 0.70
Two-sided type I error 5%
Power 80%
Expected event proportion 65%
Dropout / loss-to-follow-up inflation 5%

The objective is to determine the required number of events and then convert that requirement into a total number of randomized patients.

Step 1: Specify the Hazard Ratio

The target treatment effect is:

\[ HR=0.70 \]

The corresponding log hazard ratio is:

\[ \log(0.70)\approx-0.3567 \]

The absolute magnitude is:

\[ |\log(0.70)|\approx0.3567 \]

The negative sign simply indicates that the experimental treatment has lower hazard under the assumed beneficial effect.

Step 2: Specify Type I Error and Power

The study uses:

\[ \alpha=0.05 \]

with a two-sided test, so:

\[ z_{1-\alpha/2}=z_{0.975}\approx1.96 \]

The target power is:

\[ 1-\beta=0.80 \]

so:

\[ z_{1-\beta}=z_{0.80}\approx0.842 \]

Step 3: Calculate the Required Number of Events

Using the equal-allocation formula:

\[ D = \frac{ 4(1.96+0.842)^2 }{ [\log(0.70)]^2 } \]

Substituting:

\[ D \approx \frac{ 4(2.802)^2 }{ (-0.3567)^2 } \]

gives approximately:

\[ D\approx246.8 \]

Because the number of events must be an integer, the design requires approximately:

\[ \boxed{D=247\text{ events}} \]
This is not yet the sample size. The calculation tells us that approximately 247 primary endpoint events are needed. We still need to determine how many patients must be randomized to obtain those events.

Step 4: Convert Events to Patients

Suppose the investigators expect approximately 65% of randomized patients to experience the primary event by the planned analysis.

Then the expected event proportion is:

\[ \pi_E=0.65 \]

A simple conversion is:

\[ N = \frac{D}{\pi_E} \]

Therefore:

\[ N = \frac{247}{0.65} \approx379.99 \]

Thus approximately:

\[ \boxed{N=380} \]

patients are required before additional inflation.

Step 5: Apply Dropout Inflation

Suppose the study anticipates 5% loss of usable follow-up.

The inflated sample size is:

\[ N_{\text{inflated}} = \frac{380}{1-0.05} \]

Therefore:

\[ N_{\text{inflated}} = \frac{380}{0.95} \approx400 \]

The planned randomized sample size is therefore:

\[ \boxed{N=400} \]

With 1:1 allocation, this corresponds to:

Treatment Group Patients
Experimental 200
Control 200
Total 400

The Complete Calculation at a Glance

Component Value
Hazard ratio 0.70
Two-sided \(\alpha\) 0.05
Power 0.80
Allocation 1:1
Required events Approximately 247
Expected event proportion 65%
Patients before inflation Approximately 380
Dropout inflation 5%
Final randomized N 400
Experimental group 200
Control group 200

What Does the 65% Event Proportion Mean?

The event proportion is not the same thing as the response rate used in a binary endpoint study.

It represents the expected proportion of randomized patients who will experience the primary event during the period included in the primary analysis.

For example, if:

\[ N=400 \]

and:

\[ \pi_E=0.65 \]

then the expected number of events is:

\[ 400(0.65)=260 \]

which exceeds the approximately 247 events required by the statistical calculation.

Planning principle: The event proportion is a bridge between the statistical requirement (events) and the operational requirement (patients).

Why the Event Proportion Is So Important

Suppose the same trial requires 247 events.

If the expected event proportion is 80%:

\[ N=\frac{247}{0.80}\approx309 \]

But if only 50% of patients are expected to experience the event:

\[ N=\frac{247}{0.50}=494 \]

The required event count is unchanged, but the required number of randomized patients changes dramatically.

Expected Event Proportion Approximate N for 247 Events
90% 275
80% 309
70% 354
65% 380
60% 412
50% 494

This is why assumptions about event rates and follow-up duration are critical in survival trial planning.

Median Survival and Hazard Ratio

For exponential survival distributions, the hazard ratio can be related to median survival.

If the hazard is constant:

\[ S(t)=e^{-\lambda t} \]

The median survival is:

\[ m=\frac{\log(2)}{\lambda} \]

Therefore, under an exponential model:

\[ HR = \frac{\lambda_1}{\lambda_0} = \frac{m_0}{m_1} \]

For example, if control median survival is 18 months and the target hazard ratio is 0.70, the corresponding experimental median under the exponential assumption would be approximately:

\[ m_1 = \frac{18}{0.70} \approx25.7\text{ months} \]
Caution: Median survival values should not be mechanically converted into hazard ratios unless the assumptions behind that relationship are appropriate. The proportional-hazards assumption and underlying survival distributions matter.

Accrual and Follow-Up

The event proportion cannot usually be chosen independently of the study timeline.

Suppose a trial has:

  • 24 months of patient accrual
  • 12 months of additional follow-up after accrual ends

Patients entering early have considerably more time to experience the event than patients entering near the end of accrual.

Therefore, the event probability varies by enrollment time.

A patient randomized at the beginning of the trial might be followed for 36 months, while the final patient might be followed for only 12 months.

1
Accrual begins: patients enter the study over calendar time.
2
Events accumulate: patients experience the primary endpoint at different times.
3
Censoring occurs: patients who remain event-free may reach the analysis cutoff.
4
Event target is reached: the trial waits until approximately the required number of events has accumulated.

Why Enrollment Alone Does Not Determine Study Completion

In an event-driven trial, the last patient may be randomized well before the primary analysis.

Conversely, if the event rate is lower than expected, the study may need additional follow-up before the required event count is reached.

Thus:

\[ \text{Study duration} \neq \text{accrual duration alone} \]

The practical study duration depends on:

  • Accrual rate
  • Number of patients
  • Event rates
  • Follow-up duration
  • Loss to follow-up
  • Administrative censoring

Event-Driven Versus Fixed-Time Designs

A survival trial may specify the primary analysis after a fixed calendar date or after a target number of events.

Approach Primary Trigger
Fixed-time analysis Prespecified calendar time
Event-driven analysis Prespecified number of events

Event-driven designs are particularly common in confirmatory time-to-event trials because the statistical information is closely related to the number of events.

Event-Driven Design Does Not Mean No Follow-Up Rule

Even when a trial is event-driven, the protocol should describe how the event target interacts with follow-up.

For example, the protocol may specify:

  • A minimum follow-up period
  • A maximum follow-up period
  • A target number of events
  • Rules for the primary database cutoff
  • How administrative censoring will be handled

These operational details are separate from the mathematical event-count requirement.

The Effect of a Smaller Hazard Ratio

The number of required events is highly sensitive to the assumed hazard ratio.

Consider a two-sided 5% test with 80% power and equal allocation.

Target HR Approximate Required Events
0.50 Approximately 90
0.60 Approximately 123
0.70 Approximately 247
0.75 Approximately 379
0.80 Approximately 631

The relationship is nonlinear because the event requirement depends on:

\[ \frac{1}{[\log(HR)]^2} \]

An effect that is closer to the null value \(HR=1\) requires substantially more events.

Clinical implication: Designing a trial to detect a modest hazard-ratio improvement can require many more events than designing it to detect a large treatment effect.

The Effect of Higher Power

Holding the hazard ratio and type I error fixed, increasing power increases the required event count.

For example, with \(HR=0.70\) and a two-sided 5% test:

Power Approximate Events
80% 247
85% Approximately 280
90% Approximately 327
95% Approximately 403

The exact values depend on the specific sample-size approximation and rounding method used.

The Effect of Type I Error

A more stringent type I error requires more events.

For example, decreasing the two-sided type I error from 5% to 1% changes the critical value from approximately 1.96 to 2.576.

The event requirement therefore increases substantially.

\[ D \propto \left(z_{1-\alpha/2}+z_{1-\beta}\right)^2 \]

Unequal Randomization

Suppose the experimental-to-control allocation is 2:1 rather than 1:1.

Then:

\[ q=\frac{2}{3} \approx0.667 \]

and:

\[ q(1-q) = \frac{2}{3}\frac{1}{3} = \frac{2}{9} \approx0.2222 \]

This is smaller than the 0.25 obtained under equal allocation.

Therefore more total events are required for the same statistical power.

General principle: For a fixed total number of events, equal allocation maximizes the information available for a simple two-group comparison.

Stratified Randomization

Clinical trials often use stratified randomization based on important prognostic factors.

Examples include:

  • Disease stage
  • Geographic region
  • Prior treatment
  • Biomarker status
  • Risk category

A stratified log-rank test can then be used to account for those strata.

The basic event-count concept remains the same, although the exact power calculation may require additional assumptions.

Stratification Does Not Automatically Reduce Sample Size

It is tempting to assume that stratification always improves power enough to reduce the sample size.

That is not necessarily true.

The benefit depends on the prognostic importance of the stratification variables and the analysis model.

A formal sample-size calculation should therefore reflect the actual planned analysis rather than applying an arbitrary "stratification adjustment."

What Does Censoring Do?

Censoring occurs when the event time is not fully observed for a patient.

For example, a patient may:

  • Remain event-free at database cutoff
  • Withdraw consent
  • Be lost to follow-up
  • Complete the study without an event

Censored patients still contribute information through their observed follow-up time.

However, they do not contribute an observed event.

Important: Censoring is not equivalent to deleting a patient from the analysis. Properly handled right-censored observations contribute information to the risk sets used by survival methods.

Administrative Censoring

Administrative censoring occurs because the study reaches its planned analysis cutoff while some patients have not yet experienced the event.

This is expected in most survival studies.

The sample-size calculation must therefore account for the fact that not all randomized patients will experience an event before the analysis.

Loss to Follow-Up

Loss to follow-up is different from ordinary administrative censoring.

A patient who is administratively censored at the planned study cutoff may have complete follow-up through that date. A patient lost to follow-up may stop providing information earlier than planned.

Excessive loss to follow-up can reduce the number of observed events and therefore reduce statistical power.

Dropout Inflation

If the calculated sample size before dropout is \(N_0\) and the anticipated proportion lost to follow-up is \(d\), a simple inflation is:

\[ N = \frac{N_0}{1-d} \]

For example, with:

\[ N_0=380 \]

and:

\[ d=0.05 \]

we obtain:

\[ N=\frac{380}{0.95}=400 \]

The final sample size is rounded upward to preserve the intended event target.

Why Dropout Inflation Can Be More Complicated

The simple formula above treats dropout as a proportion of patients that can be directly removed from the analyzable sample.

In a real survival trial, however, the timing of dropout matters.

A patient lost after 18 months contributes substantially more follow-up information than a patient lost after 2 months.

Therefore, more sophisticated sample-size methods may model:

  • Accrual distribution
  • Event-time distribution
  • Loss-to-follow-up hazard
  • Administrative censoring
  • Nonuniform accrual

The Exponential Approximation

One simple way to model survival time is to assume an exponential distribution.

Under an exponential distribution:

\[ S(t)=e^{-\lambda t} \]

and the probability of an event by time \(t\) is:

\[ P(T\le t) = 1-e^{-\lambda t} \]

This model can be useful for illustrating how accrual and follow-up affect the expected number of events.

However, clinical survival distributions are not necessarily exponential.

Do not confuse a planning model with a scientific truth. Exponential survival assumptions can be useful for sample-size calculations, but the final design should use clinically credible survival assumptions.

Calculating Event Probability Under Exponential Survival

Suppose the control median survival is \(m_0\).

The corresponding exponential hazard is:

\[ \lambda_0=\frac{\log(2)}{m_0} \]

If the experimental hazard ratio is \(HR\), then:

\[ \lambda_1=HR\lambda_0 \]

The event probability after follow-up duration \(t\) is:

\[ \pi_E(t)=1-e^{-\lambda t} \]

These formulas can be used to construct a simplified event-rate model.

Accrual Creates Different Follow-Up Times

Suppose accrual occurs uniformly over \(A\) months and the study continues for \(F\) additional months after accrual ends.

A patient enrolled at time \(u\), where:

\[ 0\le u\le A \]

has approximately:

\[ t(u)=A+F-u \]

months of potential follow-up by the analysis cutoff.

Patients enrolled earlier therefore have more opportunity to experience the event.

Average Event Probability Under Uniform Accrual

Under a simple exponential model with uniform accrual, the average event probability in one treatment group can be represented approximately as:

\[ \bar{\pi}_E = \frac{1}{A} \int_0^A \left[ 1-e^{-\lambda(A+F-u)} \right]du \]

This illustrates why the event proportion is linked to accrual duration and follow-up.

In practice, sample-size software often performs these calculations using more detailed assumptions.

Why Median Survival Alone Is Not Enough

Suppose two studies both assume a control median survival of 18 months.

They may nevertheless have very different event proportions because one has:

  • Fast patient accrual
  • Long follow-up

while another has:

  • Slow patient accrual
  • Short follow-up

The statistical event requirement can be identical while the total patient requirement differs substantially.

Event Target Versus Number Randomized

This distinction is worth emphasizing.

Quantity Meaning
Required events Number of primary endpoint events needed for statistical information
Randomized N Number of patients entering the trial
Event proportion Expected fraction of randomized patients experiencing the event
Analysis cutoff Time at which the primary analysis is performed

Confusing these quantities is one of the most common mistakes in survival sample-size planning.

Power as a Function of the Number of Events

The log-rank test's power increases as the number of observed events increases.

The approximate standardized signal is proportional to:

\[ \sqrt{Dq(1-q)}\,|\log(HR)| \]

where \(D\) is the number of events.

Thus, information grows approximately with the square root of the number of events.

Doubling the number of events does not double the standardized treatment signal.

Deriving the Event Formula

For a two-group proportional-hazards comparison, the variance of the estimated log hazard ratio is approximately:

\[ \operatorname{Var}\{\widehat{\log(HR)}\} \approx \frac{1}{Dq(1-q)} \]

Therefore the approximate standard error is:

\[ SE\{\widehat{\log(HR)}\} \approx \frac{1}{\sqrt{Dq(1-q)}} \]

The standardized effect is therefore approximately:

\[ Z \approx \sqrt{Dq(1-q)} \left|\log(HR)\right| \]

Solving for \(D\) gives the standard event-count approximation:

\[ D = \frac{ \left(z_{1-\alpha/2}+z_{1-\beta}\right)^2 }{ q(1-q)[\log(HR)]^2 } \]

A Useful Mental Model

The formula can be understood as:

1
Effect size: How far the hazard ratio is from 1.
2
Error control: How stringent the type I error is.
3
Power: How reliably the desired effect must be detected.
4
Allocation: How efficiently patients are divided between the two treatment groups.
5
Events: How many endpoint events are needed to provide the required information.
6
Patients: How many patients must be randomized to obtain those events.

R Implementation: Required Events

The basic Schoenfeld event calculation can be implemented directly in R.

alpha <- 0.05
power <- 0.80
HR <- 0.70

z_alpha <- qnorm(1 - alpha / 2)
z_beta  <- qnorm(power)

D <- 4 * (z_alpha + z_beta)^2 /
     log(HR)^2

ceiling(D)

The result is approximately:

[1] 247

Thus approximately 247 events are required.

R Implementation: Unequal Allocation

For an unequal allocation ratio, use:

alpha <- 0.05
power <- 0.80
HR <- 0.70

q <- 2 / 3

z_alpha <- qnorm(1 - alpha / 2)
z_beta  <- qnorm(power)

D <- (z_alpha + z_beta)^2 /
     (q * (1 - q) * log(HR)^2)

ceiling(D)

This illustrates how the allocation ratio enters the event calculation.

R Implementation: Convert Events to Patients

required_events <- 247
event_rate <- 0.65

N <- ceiling(
  required_events / event_rate
)

N

This gives:

[1] 380

Now apply 5% dropout inflation:

dropout <- 0.05

N_final <- ceiling(
  N / (1 - dropout)
)

N_final

which gives:

[1] 400

A Reusable R Function

A simple function can automate the basic calculation.

survival_sample_size <- function(
    HR,
    alpha = 0.05,
    power = 0.80,
    allocation = 1,
    event_rate = 0.65,
    dropout = 0
) {

  q <- allocation / (allocation + 1)

  z_alpha <- qnorm(1 - alpha / 2)
  z_beta  <- qnorm(power)

  events <- (
    z_alpha + z_beta
  )^2 / (
    q * (1 - q) * log(HR)^2
  )

  events <- ceiling(events)

  patients_before_dropout <- ceiling(
    events / event_rate
  )

  patients_final <- ceiling(
    patients_before_dropout /
      (1 - dropout)
  )

  list(
    required_events = events,
    patients_before_dropout = patients_before_dropout,
    final_sample_size = patients_final,
    experimental_n = ceiling(patients_final * q),
    control_n = floor(patients_final * (1 - q))
  )
}

Run the Worked Example

survival_sample_size(
  HR = 0.70,
  alpha = 0.05,
  power = 0.80,
  allocation = 1,
  event_rate = 0.65,
  dropout = 0.05
)

The calculation produces approximately:

$required_events
[1] 247

$patients_before_dropout
[1] 380

$final_sample_size
[1] 400

$experimental_n
[1] 200

$control_n
[1] 200

Calculating the Required Events Across Hazard Ratios

It is useful to examine how sensitive the event requirement is to the assumed treatment effect.

HR_values <- c(
  0.50,
  0.60,
  0.70,
  0.75,
  0.80,
  0.85,
  0.90
)

required_events <- sapply(
  HR_values,
  function(HR) {

    ceiling(
      4 *
      (qnorm(0.975) + qnorm(0.80))^2 /
      log(HR)^2
    )
  }
)

data.frame(
  HR = HR_values,
  Events = required_events
)

This type of sensitivity analysis is extremely useful during protocol development.

Sensitivity Analysis for the Event Rate

The event-rate assumption should also be varied.

event_rates <- c(
  0.50,
  0.55,
  0.60,
  0.65,
  0.70,
  0.75,
  0.80
)

sample_sizes <- ceiling(
  247 / event_rates
)

data.frame(
  Event_Rate = event_rates,
  Required_N = sample_sizes
)

This shows how quickly the total patient requirement increases when fewer patients are expected to experience the event.

Sample Size Should Usually Be Based on Realistic Event Timing

A common but potentially dangerous shortcut is:

\[ N=\frac{\text{required events}}{\text{assumed event rate}} \]

without carefully justifying the event rate.

The formula itself is straightforward. The difficult part is determining whether the event-rate assumption is credible.

The event rate should ideally be informed by:

  • Historical clinical-trial data
  • Prior studies in the target population
  • Registry or real-world data when appropriate
  • Expected control-group survival
  • Expected treatment effect
  • Accrual assumptions
  • Follow-up duration
  • Potential changes in standard of care
  • Loss to follow-up

Common Sample-Size Mistake: Treating 65% as a Response Rate

In a survival trial, an event proportion such as 65% does not mean that the treatment "works" in 65% of patients.

It means that approximately 65% are expected to experience the defined event by the relevant analysis time.

For progression-free survival, for example, the event may be:

  • Disease progression
  • Death

depending on the endpoint definition.

For overall survival, the event is death.

Always define the event precisely. "Event rate" has no useful statistical meaning unless the primary endpoint specifies exactly what constitutes an event and how competing situations are handled.

Competing Risks

The ordinary log-rank framework is not automatically appropriate for every time-to-event endpoint.

Suppose the endpoint is time to disease recurrence, but patients can die before recurrence.

Death may prevent recurrence from being observed and can therefore act as a competing event.

In such settings, the scientific question must be clarified.

Different estimands may lead to different analyses, such as:

  • Cause-specific hazards
  • Subdistribution hazards
  • Cumulative incidence functions

The sample-size method should correspond to the planned primary analysis.

Non-Proportional Hazards

The standard log-rank event-count formula is closely connected to the proportional-hazards framework.

But treatment effects may not be proportional over time.

Examples include:

  • Delayed treatment effects
  • Early toxicity followed by benefit
  • Immunotherapy trials with delayed separation
  • Crossing survival curves

In such cases, a single hazard ratio may not adequately describe the treatment effect.

Important: If non-proportional hazards are expected, the conventional Schoenfeld event-count calculation may not provide an adequate representation of the planned design's actual power.

Restricted Mean Survival Time

An alternative estimand for some survival trials is the restricted mean survival time, or RMST.

For a restriction time \(\tau\):

\[ RMST(\tau) = \int_0^\tau S(t)\,dt \]

The treatment effect can then be represented as an RMST difference:

\[ \Delta_{RMST} = RMST_1(\tau)-RMST_0(\tau) \]

If RMST is the primary analysis, the standard log-rank event formula is not the appropriate sample-size formula.

Interim Analyses

Many confirmatory survival trials include interim analyses for efficacy, futility, or both.

If the trial uses a group-sequential design, the ordinary fixed-design Schoenfeld formula should not simply be used without adjustment.

The design must account for:

  • Number and timing of interim analyses
  • Information fractions
  • Stopping boundaries
  • Overall type I error
  • Desired power

The required event count may therefore differ from the fixed-design calculation.

Multiplicity

Survival endpoints may also be part of a multiple-testing strategy.

For example, a trial may have:

  • Multiple primary endpoints
  • Hierarchical testing
  • Multiple treatment comparisons
  • Co-primary endpoints
  • Multiple interim decisions

The effective type I error allocated to the log-rank comparison may therefore differ from a simple 0.05 two-sided test.

Sample size follows the analysis plan. The correct survival sample-size calculation should be based on the actual primary hypothesis, alpha allocation, estimand, and analysis procedure.

What If the Treatment Effect Is Smaller Than Expected?

Suppose the study is designed for:

\[ HR=0.70 \]

but the true treatment effect is:

\[ HR=0.80 \]

The trial will have less power than the planned 80%, because the true effect is closer to the null.

This is one reason investigators should perform sensitivity analyses around the assumed hazard ratio.

What If the Event Rate Is Lower Than Expected?

Suppose 400 patients are randomized, but only 50% experience the event rather than the anticipated 65%.

The expected number of events would be:

\[ 400(0.50)=200 \]

which is substantially below the approximately 247-event target.

The study may therefore have less power than intended at the planned analysis.

This is why event-rate assumptions can be as important operationally as the hazard-ratio assumption.

Event-Driven Sample Size and Trial Duration

If the required event count has not been reached when the planned calendar follow-up ends, investigators may face a decision about extending follow-up.

For example:

1
The study randomizes the planned number of patients.
2
The expected event rate is lower than predicted.
3
The target number of events has not yet accumulated.
4
Additional follow-up may be needed before the primary analysis.

This is a practical reason to perform realistic event-time simulations or detailed sample-size calculations during study planning.

Sample Size Versus Number of Events: A Worked Comparison

Suppose three trials all require 247 events.

Expected Event Proportion Required Patients
80% 309
65% 380
50% 494

The statistical information requirement has not changed. Only the ability to generate those events has changed.

Sample Size Versus Effect Size

Now hold the expected event proportion at 65%.

Target HR Approximate Events Approximate Patients Before Dropout
0.60 Approximately 123 Approximately 189
0.70 Approximately 247 Approximately 380
0.75 Approximately 379 Approximately 583
0.80 Approximately 631 Approximately 971

This demonstrates why a trial intended to detect a modest hazard-ratio improvement can become very large.

The Importance of Clinical Plausibility

A sample-size calculation can be mathematically correct and still produce a poor clinical trial if the assumptions are unrealistic.

For example, assuming:

\[ HR=0.60 \]

may dramatically reduce the required number of events compared with:

\[ HR=0.80 \]

But if an HR of 0.60 is not clinically plausible, the resulting small trial may be inadequately powered to detect the effect that actually matters.

Design the trial around the smallest clinically important effect, not the largest effect that makes the sample size attractive.

Common Mistakes

  1. Confusing events with patients. The log-rank calculation usually produces a required number of events, not directly a randomized sample size.
  2. Ignoring the event proportion. The conversion from events to patients depends on how many patients are expected to experience the endpoint.
  3. Using an unrealistic hazard ratio. The assumed effect should be clinically justified.
  4. Ignoring accrual and follow-up. Event probability depends on how long patients are observed.
  5. Applying a two-sided formula to a one-sided design. The critical normal quantile changes.
  6. Ignoring allocation ratio. Unequal allocation changes the statistical information per event.
  7. Ignoring loss to follow-up. Unexpected censoring can reduce the number of usable events.
  8. Assuming proportional hazards automatically. The standard event formula is based on a proportional-hazards framework.
  9. Using the log-rank formula for a different estimand. RMST, competing-risk analyses, and other survival estimands may require different sample-size methods.
  10. Ignoring interim analyses. Group-sequential designs may require different event targets.
  11. Reporting only the final N. The number of required events should also be reported.

A Practical Survival Sample-Size Workflow

1
Define the primary time-to-event endpoint.
2
Define precisely what constitutes an event.
3
Specify the primary estimand and analysis method.
4
Specify the clinically meaningful hazard ratio.
5
Specify the type I error and whether testing is one-sided or two-sided.
6
Specify the desired statistical power.
7
Specify the treatment allocation ratio.
8
Calculate the required number of events.
9
Model the expected event proportion using clinically credible survival, accrual, and follow-up assumptions.
10
Convert required events into the number of randomized patients.
11
Account for anticipated loss to follow-up and other relevant inefficiencies.
12
Perform sensitivity analyses over plausible hazard ratios and event rates.
13
Document the final event target, sample size, accrual assumptions, and analysis timing in the protocol.

What Should Be Reported in the Protocol?

A survival sample-size section should be sufficiently detailed that another statistician can reproduce the calculation.

At minimum, report:

  • Primary survival endpoint
  • Definition of the event
  • Primary analysis method
  • Hazard ratio to be detected
  • Type I error
  • One-sided or two-sided testing
  • Target power
  • Randomization ratio
  • Required number of events
  • Expected event proportion
  • Total randomized sample size
  • Expected dropout or loss to follow-up
  • Accrual duration
  • Additional follow-up duration
  • Expected control-group survival assumptions
  • Method used to determine the event probability
  • Interim-analysis assumptions, if applicable

Worked Example: Protocol-Style Summary

Design Component Planning Value
Primary endpoint Progression-free survival
Primary analysis Two-sided log-rank test
Hazard ratio 0.70
Type I error 0.05
Power 80%
Allocation 1:1
Required events Approximately 247
Expected event proportion 65%
Patients before dropout inflation Approximately 380
Dropout inflation 5%
Final randomized sample size 400
Experimental group 200
Control group 200

Important Distinction: Event Requirement vs. Final N

A concise way to remember the entire calculation is:

\[ \boxed{ \text{Effect size} \longrightarrow \text{Required events} \longrightarrow \text{Event proportion} \longrightarrow \text{Randomized N} } \]

The first part is primarily statistical. The second part is primarily an event-generation and operational problem.

This distinction is one of the most important concepts in clinical-trial survival sample-size planning.

Why the Number of Events Is the Statistical Currency

For the conventional proportional-hazards comparison, the approximate information available for estimating the treatment effect increases with the number of events.

The central relationship is:

\[ I \approx Dq(1-q) \]

where \(I\) represents information, \(D\) is the number of events, and \(q\) is the experimental-group allocation fraction.

The precision of the log hazard-ratio estimate therefore improves as the number of events increases.

Bottom line: For a conventional two-arm log-rank survival comparison, the required number of events is determined primarily by the hazard ratio, type I error, power, and allocation ratio. The number of randomized patients is then determined by how efficiently the planned trial is expected to generate those events.

Final Takeaways

  • Start with the hazard ratio. The clinically meaningful treatment effect determines the statistical signal.
  • Calculate events first. The log-rank test is fundamentally event-driven.
  • Do not confuse events with patients. The required randomized sample is usually larger than the required event count.
  • Event proportion matters. A lower event rate requires more randomized patients.
  • Accrual and follow-up matter. They determine how much opportunity patients have to experience the event.
  • Equal allocation is statistically efficient. Unequal allocation generally requires more total events for the same power.
  • Dropout reduces information. Loss to follow-up should be incorporated into planning.
  • Proportional hazards matter. The conventional Schoenfeld event formula is based on that framework.
  • Event-driven does not mean calendar-independent. The time required to reach the event target depends on accrual and event rates.
  • Perform sensitivity analyses. Hazard ratio and event-rate assumptions can have enormous effects on the final sample size.
Bottom line: Sample-size planning for survival endpoints using the log-rank test is best understood as a two-step problem. First, determine how many events are needed to detect the prespecified hazard ratio with the desired type I error and power. Second, determine how many patients must be randomized to generate those events given the expected event probability, accrual pattern, follow-up, and loss to follow-up. In the worked example, a two-sided 5% log-rank test with 80% power to detect \(HR=0.70\) requires approximately 247 events under equal allocation. Assuming a 65% event proportion gives approximately 380 patients, and a 5% dropout inflation produces a final randomized sample size of approximately 400 patients.

References

Freedman, L.S. (1982). Tables of the number of patients required in clinical trials using the logrank test. Statistics in Medicine, 1(2), 121–129.
Schoenfeld, D.A. (1983). Sample-size formula for the proportional-hazards regression model. Biometrics, 39(2), 499–503.
Schoenfeld, D. (1981). The asymptotic distribution of the Kaplan-Meier integral and related statistics. Annals of Statistics.
Lachin, J.M. & Foulkes, M.A. (1986). Evaluation of sample size and power for analyses of survival with allowance for nonuniform patient entry, losses to follow-up, noncompliance, and stratification. Biometrics, 42(3), 507–519.
Machin, D., Cheung, Y.B. & Parmar, M.K.B. Survival Analysis: A Practical Approach. Wiley.
Collett, D. Modelling Survival Data in Medical Research. Chapman & Hall/CRC.