Why the Same Test Behaves Differently Across Hazard Patterns
A logrank test combines comparisons made at event times into one score. With the ordinary logrank test, each event-time comparison receives weight 1. A weighted logrank test instead multiplies each comparison by a prespecified weight that can emphasize some event times more than others. This choice matters because a treatment effect may be stable over time, delayed, or changing direction.
Under proportional hazards, the treatment-to-control hazard ratio is constant over time. If the treatment hazard is lower throughout follow-up, a test using nonnegative weights tends to accumulate evidence in the same direction, although the size of its standardized statistic depends on the weights. Under nonproportional hazards, treatment effects can differ over time or reverse direction. Contributions from different periods can then reinforce or cancel one another. A weighted test is therefore not just a different calculation: its weight function determines how the test responds to the pattern of effects.
Score, Variance, and Hypothesis
Let group 1 denote treatment and group 0 control. At the \(j\)th distinct event time \(t_j\), let \(Y_{1j}\) and \(Y_{0j}\) be the numbers at risk just before the event time, and let \(d_{1j}\) and \(d_{0j}\) be the numbers of events. Write \(Y_j=Y_{1j}+Y_{0j}\) and \(d_j=d_{1j}+d_{0j}\). Under the null hypothesis of equal hazards, the expected number of treatment events, conditional on the risk sets and total events at that time, is \(Y_{1j}d_j/Y_j\).
The variance expression applies when \(Y_j>1\); it accounts for the finite-risk-set correction when there are tied events. With one event at each event time, it reduces to \(w_j^2(Y_{1j}/Y_j)(Y_{0j}/Y_j)\). The standardized statistic is \(Z_w=U_w/\sqrt{V_w}\). For a large enough number of events, under the null and the assumptions below, \(Z_w\) is approximately standard normal. A two-sided test compares \(|Z_w|\) with a standard-normal cutoff, or uses the corresponding two-sided p-value.
The hypotheses are typically \(H_0:\lambda_1(t)=\lambda_0(t)\) throughout the analysis period versus a departure from equality, where \(\lambda_1(t)\) and \(\lambda_0(t)\) are the treatment and control hazards. The score’s sign has a useful orientation: negative \(U_w\) means fewer weighted treatment events than expected under \(H_0\), and positive \(U_w\) means more. That direction is interpretable as evidence only in light of the chosen group coding and weights.
The usual justification assumes independent subjects, correctly recorded event and censoring times, and censoring independent of the event time within the groups being compared. Risk sets must be defined consistently, and there must be adequate follow-up and events in both groups for a useful comparison. Weights should be specified in advance or constructed in a way that preserves validity under the null. For instance, Fleming–Harrington weights use the pooled Kaplan–Meier estimate just before each event time, so the current event is not used to set its own weight. Tied-event calculations should use a method appropriate to the tie structure and applied consistently.
What the Weight Does Under Different Hazards
A useful way to understand the score is to consider its expected direction over time. In a continuous-time approximation, the expected weighted score accumulates roughly in proportion to \(w(t)Y_1(t)Y_0(t)\{\lambda_1(t)-\lambda_0(t)\}/Y(t)\), where \(Y(t)=Y_1(t)+Y_0(t)\). The risk-set factor determines how much information is available at time \(t\); the hazard difference determines the direction of the contribution; and the weight changes its emphasis.
This approximation is for interpretation, not a substitute for the event-time score calculation. It shows why a weight alone cannot guarantee that late events matter: few people at risk, or heavy censoring, may leave little late information even when \(w(t)\) is large. The variance also depends on the weights, through \(w_j^2\). Increasing a weight may increase both the expected score and its variability.
Under proportional hazards, \(\lambda_1(t)=\theta\lambda_0(t)\) for a constant hazard ratio \(\theta\). If \(\theta<1\), the treatment hazard is lower at every time. With nonnegative weights, expected score contributions therefore point in the same direction, though different weights give different standardized statistics. The ordinary logrank test is generally the efficient choice for a prespecified proportional-hazards alternative under the usual model; extra time weighting can lose efficiency for that alternative. It does not follow that every weighted test must have less power in every finite design.
Under nonproportional hazards, the hazard difference can change size or sign. If it changes sign, contributions may cancel in the unweighted score. A weight emphasizing the period in which the treatment is beneficial can reduce that cancellation, while a weight emphasizing the opposite period can increase it. Fleming–Harrington weights are one family: \(w(t)=\hat S(t-)^\rho\{1-\hat S(t-)\}^{\gamma}\), with \(\rho,\gamma\geq0\) and \(\hat S(t-)\) the pooled Kaplan–Meier estimate just before \(t\). Choosing \(\rho\) and \(\gamma\) changes the relative emphasis on earlier and later failures. The introductory material on Fleming–Harrington weights covers their time emphasis; the key point here is that their time emphasis interacts with the hazard pattern and the risk sets.
A weighted logrank test is a test of a survival-distribution or hazard-equality null, not an estimate of one universal hazard ratio under nonproportional hazards. Its score and p-value summarize evidence according to the selected weights. They do not by themselves say how large a treatment benefit is in months of survival, nor do they identify the full time course of the effect.
Worked Example: Calculating Two Weighted Scores
Consider a hypothetical randomized study with the following risk sets at three event times. Between event times, censoring leaves the stated risk sets; the event at \(t=2\) is in control, the event at \(t=5\) is in treatment, and the event at \(t=8\) is in control.
| Event time | \(Y_{1j}\) | \(Y_{0j}\) | \(d_{1j}\) | \(d_j\) |
|---|---|---|---|---|
| 2 | 5 | 5 | 0 | 1 |
| 5 | 4 | 4 | 1 | 1 |
| 8 | 3 | 3 | 0 | 1 |
For the ordinary logrank test, \(w=(1,1,1)\). The expected treatment event count is \(Y_{1j}/Y_j\) at each time because \(d_j=1\). Thus the three score contributions are \(0-5/10=-0.5\), \(1-4/8=0.5\), and \(0-3/6=-0.5\). Therefore \(U_w=-0.5\). Each unweighted variance contribution is \(p(1-p)\), where \(p=Y_{1j}/Y_j=0.5\), so \(V_w=0.25+0.25+0.25=0.75\). The standardized statistic is \(Z_w=-0.5/\sqrt{0.75}=-0.577\), approximately. Its two-sided normal-approximation p-value is about 0.564; these data do not provide strong evidence against equal hazards.
Now use the prespecified illustrative weights \(w=(1,1,2)\), giving more emphasis to the last event time. The weighted score is \(U_w=(-0.5)+(0.5)+2(-0.5)=-1.0\). The variance is \(V_w=1^2(0.25)+1^2(0.25)+2^2(0.25)=1.50\). Hence \(Z_w=-1.0/\sqrt{1.50}=-0.816\), with a two-sided normal-approximation p-value of about 0.415. The test remains nonsignificant at the 0.05 level. The more negative score reflects late weighting of a treatment event deficit, but the increased variance must be included; one cannot judge evidence by comparing scores alone.
Worked Comparisons of Hazard Patterns
Worked Example: Proportional Hazards Keep a Common Direction
Suppose a hypothetical study has a constant treatment-to-control hazard ratio \(\theta=0.75\), with control hazard \(0.04\) events per person-year throughout follow-up. Then the treatment hazard is \(0.75(0.04)=0.03\) events per person-year, and the hazard difference is \(\lambda_1-\lambda_0=-0.01\) events per person-year at both early and late times.
For illustration, suppose the integrated risk-set factors \( \int Y_1Y_0/Y\,dt\) are 50 person-years early and 30 person-years late. The approximate expected ordinary-score contributions are \(50(-0.01)=-0.50\) events early and \(30(-0.01)=-0.30\) events late, totaling \(-0.80\). With weights 1 early and 2 late, the expected score becomes \((-0.50)+2(-0.30)=-1.10\). Both scores point toward fewer treatment events, as expected under a lower treatment hazard. This does not establish that the weighted test has greater power: its variance also changes, and the ordinary logrank test is typically efficient for the proportional alternative.
Worked Example: Crossing Effects Can Cancel or Reinforce
Now suppose a hypothetical treatment has a higher hazard early and a lower hazard later. Let the early and late hazard differences be \(+0.01\) and \(-0.02\) events per person-year, and suppose the corresponding integrated risk-set factors are 40 and 20 person-years. These are hypothetical summaries chosen to illustrate how the score combines periods.
With ordinary weights, the approximate early contribution is \(40(0.01)=+0.40\), while the late contribution is \(20(-0.02)=-0.40\). The total expected score is \(0.40-0.40=0\): the opposing effects cancel in this simplified calculation. If the late period receives weight 2, the total becomes \(1(0.40)+2(-0.40)=-0.40\). The weighted score now reflects the late treatment advantage more than the early disadvantage. If instead the early period received greater weight, the total could be driven toward the opposite direction. Neither result alone describes the complete clinical effect; it describes the contrast to which that test is most responsive.
Diagnostics, Alternatives, and Limitations
Before interpreting a weighted test, inspect the observed survival curves, the numbers at risk over time, and the event-time contributions to the score. These are practical checks on whether the chosen emphasis corresponds to periods with usable information. A large late weight is of little practical use if few participants remain at risk. Also verify that the weight was specified before examining treatment differences; choosing it after seeing which choice gives the smallest p-value can make the nominal type I error rate invalid unless that selection is accounted for.
The ordinary logrank test is the natural main alternative when proportional hazards is a reasonable working model or when no particular time pattern should be emphasized. A prespecified weighted test may be more sensitive to a plausible delayed or otherwise time-varying effect, but its result depends on the selected weight. When timing is uncertain, a family of tests can be considered with an appropriate adjustment for taking the maximum; that approach is distinct from interpreting any single weighted score. Other estimands may be more directly interpretable when hazards are nonproportional, but they answer different questions.
Common warning signs include very sparse late risk sets, extreme weights, treatment-effect reversals, and a weight chosen after reviewing the observed treatment contrast. A test can also be technically valid under the null but poorly matched to the scientific alternative, yielding low power. In a group sequential design, repeated looks require boundaries calibrated for the monitoring plan; applying a single-look cutoff at every look does not preserve the planned overall type I error rate.
- Mistake: “The weighted score is more negative, so the weighted test must be more significant.” Correction: Standardize by \(\sqrt{V_w}\); weights alter the variance as well as the score.
- Mistake: “A significant late-weighted test proves a constant hazard ratio below 1.” Correction: It rejects the tested null in a way influenced by late event-time contrasts; it does not establish proportional hazards or a single constant effect.
- Mistake: “A late weight creates information late in follow-up.” Correction: Weighting changes the contribution of available risk-set comparisons; it cannot replace missing events or participants.
The main limitation is that the weight encodes a choice about which event-time differences matter most. A statistically valid result can still be hard to interpret clinically if the chosen weighting does not match the trial question. State the weight, the direction of the score, the variance method, and the assumptions alongside the p-value. If a sequential monitoring plan is used, report the sequentially calibrated inference rather than treating the final weighted statistic as an unplanned single analysis.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- If the treatment hazard is consistently lower than the control hazard, what direction do nonnegative weighted-score contributions tend to have?
- In a two-period illustration, the unweighted expected contributions are \(+0.3\) early and \(-0.5\) late. What is the total with weights 1 early and 2 late?
- Why is comparing two weighted scores without comparing their variances insufficient?
- Does a significant weighted logrank test under nonproportional hazards estimate a constant hazard ratio? Explain.
Solutions. (1) They tend to be negative when treatment is group 1, because observed treatment events are lower than expected under equal hazards; random variation can still produce contributions of either sign. (2) The weighted total is \(1(0.3)+2(-0.5)=-0.7\), so late benefit dominates the weighted score. (3) The standardized statistic is \(U_w/\sqrt{V_w}\), and weights change both the score and its variance; a larger absolute score need not mean stronger standardized evidence. (4) No. The test is a weighted test of equality, and under changing hazards its result reflects the selected time weighting, not a constant hazard-ratio estimate.