Skip to main content
v2026.11,610 entries · CC-BY 4.0

The Log-Rank Test and Its Variants: When Equal Weighting Loses Power

The log-rank test compares Kaplan-Meier survival curves with equal weight at every event time — which is exactly why it loses power against crossing curves and non-proportional hazards, and when the Wilcoxon, Tarone-Ware, and Peto weighted variants take over.

Ask about The Log-Rank Test and Its Variants: When Equal Weighting Loses Power

Answers are drawn from this guide and the rest of the CASRAI corpus, with a link to every source.

Answers are AI-generated from CASRAI’s own published pages and can be wrong, so check the linked sources before relying on one; your question is logged without personal data — never sold, never used to train a third-party model — to show us what CASRAI is missing, so please do not type personal or confidential details. How we use this

Written and maintained by CASRAI Editorial Board

Last updated

The log-rank test compares two or more Kaplan-Meier survival curves and returns a single p-value for whether the underlying hazard functions differ. What most descriptions leave out is that “the log-rank test” is really the default member of a small family of tests that differ only in how much weight they put on early versus late follow-up time. Picking the wrong member of that family — or not knowing there’s a choice at all — is why a real, visible gap between two survival curves can come back statistically non-significant, especially when the curves cross.

This guide covers what the standard test actually computes, why its default equal-weighting assumes a specific shape of difference between groups, when that assumption breaks (crossing curves, non-proportional hazards, a delayed treatment effect), and how the Wilcoxon (Gehan-Breslow), Tarone-Ware, Peto-Peto, and Fleming-Harrington variants redistribute that weight to recover power in those cases. For the mechanics of reading the curve itself, see How to Read a Kaplan-Meier Curve; for the regression approach that estimates a hazard ratio rather than just testing for a difference, see The Cox Proportional Hazards Model.

What the log-rank test actually computes

The log-rank test does not compare the two curves at one point (like “5-year survival”) or compare means. It works through every distinct event time in the pooled data, one at a time. At each time a death (or other event) occurs in either group, the test asks: given the number of subjects still at risk in each group at that moment, how many of the observed events would we expect in each group if the two groups had identical hazard — the same instantaneous risk of the event — at that time? That expected count follows a hypergeometric distribution determined entirely by the risk-set sizes and the total number of events at that time, under the null hypothesis.

Summing the (observed − expected) difference across every event time, then squaring and dividing by the summed variance, produces a chi-square statistic with degrees of freedom equal to the number of groups minus one. Two groups: one degree of freedom. This is structurally the same observed-vs-expected logic as a chi-square test of independence, just accumulated across many small 2×2-style tables instead of one.

The equal-weighting default, and what it assumes

Every event time contributes to that sum with a weight. The standard log-rank test sets that weight to exactly 1 at every event time, early or late in follow-up. That is a modeling choice, not a neutral default: it makes the test most powerful specifically against a proportional-hazards alternative — one group’s hazard is a constant multiple of the other’s, throughout the whole follow-up period. Under that alternative, the direction and rough magnitude of the observed-vs-expected deviation is consistent at every event time, so summing them with equal weight accumulates evidence efficiently in one direction.

Statistically, the standard log-rank test is the rho = 0 member of the Fleming-Harrington G(ρ,γ) family, which assigns each event time a weight of S(t)ρ × (1 − S(t))γ, where S(t) is the pooled Kaplan-Meier survival estimate just before that time. At ρ = γ = 0, every weight collapses to 1 regardless of how far into follow-up the event occurred — which is exactly the log-rank test. Raising ρ above 0 pushes weight toward the early part of the curve (where S(t) is still close to 1); raising γ above 0 pushes weight toward the late part (where S(t) has fallen toward 0). The named variants below are specific, commonly-implemented points in that same family.

Where the log-rank test loses power: crossing curves and non-proportional hazards

Equal weighting is a liability the moment the true difference between groups isn’t constant in direction across follow-up. The clearest case is crossing survival curves: one group has higher hazard (and pulls ahead in cumulative events) early, then the relationship reverses and the other group’s hazard is higher later — a pattern seen, for example, when a more aggressive treatment carries higher early risk but a durable later benefit. At early event times the observed-minus-expected deviation runs in one direction; at later event times it runs in the other. Because the standard test sums those deviations with identical weight, the two phases partially cancel each other out in the total statistic — the test can return a non-significant p-value for two curves that are visibly, substantively different, not because the difference isn’t real but because summing it with flat weighting nets it toward zero.

The same power loss shows up, less dramatically, whenever hazards are merely non-proportional without an outright crossing: a delayed treatment effect (curves overlap for a period, then diverge only later — common with immunotherapies), or a treatment effect that fades over time. In both cases the hazard ratio isn’t constant, so the log-rank test’s implicit proportional-hazards assumption is violated and its power against the true alternative degrades, even though the test remains valid under the null of truly identical curves. This is also the reason a Cox model’s proportionality assumption is worth checking on the same data — see the Cox proportional hazards guide for how to check it — since a single hazard ratio from that model has the same interpretability problem for a non-proportional relationship that the standard log-rank test has for detecting one.

The weighted variants, and what each is built to catch

Wilcoxon (Gehan-Breslow) test

Generalizes the two-sample Wilcoxon rank-sum test to censored data by weighting each event time by the number of subjects still at risk at that time — which is largest early in follow-up and shrinks as subjects are censored or experience the event. That makes it more sensitive than the log-rank test to differences concentrated early in follow-up, at the cost of being more powerful against exactly the alternative the log-rank test is weak on. Its known weakness: because the weight depends on the risk-set size, it can be distorted by differential censoring between groups — if one group is censored much more heavily than the other, the risk-set-based weighting no longer purely reflects follow-up time.

Peto-Peto (Prentice) modification

Addresses the Gehan-Wilcoxon test’s censoring sensitivity by weighting each event time with the pooled Kaplan-Meier survival estimate, S(t), instead of the raw risk-set count. S(t) still declines over follow-up, so the test still emphasizes early differences relative to late ones, but the weight is less distorted by censoring imbalance between groups than Gehan-Wilcoxon’s risk-set weighting. In practice the Peto-Peto and Gehan-Wilcoxon results are often close on real data with moderate, comparable censoring; they diverge more when censoring patterns differ meaningfully between groups.

Tarone-Ware test

A deliberate middle ground: weights each event time by the square root of the number at risk, rather than the risk-set count itself. That produces less extreme early-weighting than Gehan-Wilcoxon while still giving meaningfully more emphasis to early differences than the flat log-rank weighting. Useful as a compromise when there’s reason to expect an early-concentrated difference but the more aggressive early-weighting of Gehan-Wilcoxon or Peto-Peto feels like it would overcorrect.

Fleming-Harrington G(ρ,γ) family

The general two-parameter form described above. Choosing ρ > 0 (with γ = 0) reproduces a Peto-Peto-like early-weighted test; choosing γ > 0 (with ρ = 0) produces a test that instead emphasizes late-follow-up differences — the useful case for a delayed treatment effect, where two curves overlap for a period and only diverge later. This is the only variant in this family built specifically to recover power for a late-emerging difference rather than an early one; the other named variants all shift weight toward early follow-up to varying degrees.

Choosing a weighting scheme

Test Weight at event time t Most powerful when the difference is…
Log-rank 1 (constant) Proportional across all of follow-up
Gehan-Wilcoxon Number at risk Concentrated early; may be censoring-sensitive
Peto-Peto (Prentice) Pooled KM estimate S(t) Concentrated early; more censoring-robust than Gehan-Wilcoxon
Tarone-Ware Square root of number at risk Moderately early-concentrated; a compromise weighting
Fleming-Harrington G(ρ,γ) S(t)ρ(1−S(t))γ Configurable — ρ for early, γ for late-emerging differences

The weighting decision belongs in the analysis plan, written before the data are unblinded — not chosen after looking at which test produces the smaller p-value on the same data. Running several weighted variants post hoc and reporting whichever crosses the significance threshold is a form of test-shopping that inflates the false-positive rate exactly like uncorrected multiple comparisons does; if the shape of the expected difference genuinely isn’t known in advance, that uncertainty belongs in the pre-specified analysis plan (e.g., “log-rank as primary, Fleming-Harrington G(0,1) as a pre-specified sensitivity analysis for a possible delayed effect”), not resolved by trying several after the fact.

A visual check of the plotted Kaplan-Meier curves — do they cross, and if so roughly when — is a legitimate part of choosing the test before running any of them, since it reflects the design and expected biology of the comparison rather than the observed p-value. See How to Read a Kaplan-Meier Curve for what to look for beyond the p-value, including risk tables and censoring marks that make an early-versus-late pattern visible at a glance.

Running it

  • R: the survival package’s survdiff() function takes a rho argument — rho = 0 (the default) is the standard log-rank test, rho = 1 gives the Peto-Peto modification of Gehan-Wilcoxon. The general two-parameter Fleming-Harrington family (independent ρ and γ) is available through packages built for it, such as survMisc.
  • SAS: PROC LIFETEST reports the log-rank, Wilcoxon, and (with the TARONE option) Tarone-Ware statistics side by side from a single call, alongside the Kaplan-Meier estimates and plot.
  • Stata: sts test defaults to log-rank; the wilcoxon, tware, and peto options select the corresponding weighted variant.

Reporting the result

Report which test was used (log-rank, or the specific weighted variant and its parameter), the test statistic, degrees of freedom, and the resulting p-value — not the p-value in isolation. Pair it with the Kaplan-Meier plot itself rather than relying on the test statistic alone to convey what the curves look like; a reader can see a crossing or a delayed divergence in the plot that a single omnibus p-value cannot communicate. If proportional hazards genuinely holds, a Cox model’s hazard ratio adds an effect-size estimate the log-rank test doesn’t provide on its own; see How to Report P-Values for the general reporting conventions this test’s result should follow. For the broader decision of which survival method to reach for in the first place, see Survival Analysis: Choosing Between Kaplan-Meier, Cox, and Parametric Models.

Frequently asked questions

Is the log-rank test the same as the Mantel-Haenszel test?

They’re the same statistic applied to different data structures. The log-rank test was developed by Nathan Mantel in 1966 as an extension of the Mantel-Haenszel procedure (originally built for stratified 2×2 contingency tables) to censored survival data, and the name “log-rank” itself was given to it by Richard and Julian Peto in a 1972 paper. In survival-analysis contexts the two names are generally used interchangeably for the unweighted (rho = 0) test.

What does it mean when two Kaplan-Meier curves cross?

It means the hazard ratio between the groups isn’t constant over time — one group has higher risk during one phase of follow-up and lower risk during another. That’s a substantive finding about the comparison, not just a statistical nuisance: it usually means a single hazard ratio or a single equally-weighted test statistic is the wrong summary of the relationship, and the more informative next step is often to describe the two phases separately (e.g., piecewise, or with a time-varying-effect model) rather than to force one number to represent both.

Can the log-rank test compare more than two groups at once?

Yes — it generalizes directly to k groups, testing the omnibus null that all k hazard functions are identical, with k − 1 degrees of freedom. A significant result says at least one group differs from the others; it doesn’t identify which pair, the same way an ANOVA F-test doesn’t identify which group means differ without a follow-up pairwise comparison.

Which test should I use if I don’t know in advance whether the difference will be early or late?

Pre-specify the standard log-rank test as primary unless there’s a specific, biologically-motivated reason to expect an early- or late-concentrated effect (e.g., a known early-risk period for a procedure, or a mechanism-of-action reason to expect a delayed treatment benefit) — in which case pre-specify the matching weighted variant, or both tests, as part of the analysis plan rather than after seeing the curves.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 44,322 indexed passages, and every answer cites the ones it drew on.