Tutorials › Group Sequential Methods and Sample Size Re-Estimation › Weighting Under Crossing Treatment Effects

Non-Proportional Hazards and Delayed Effects · Tutorial 531 of 699

Weighting Under Crossing Treatment Effects

You will learn to calculate and interpret signed weighted logrank contributions when treatment effects reverse over time, and to diagnose when weighting helps or harms.

Advanced 10 min read

What You'll Learn

  • Define the direction of a weighted logrank score and interpret its signed contributions over time.
  • Explain why treatment-effect reversals can cause early and late score contributions to cancel.
  • Calculate weighted scores, null variances, and standardized statistics from hypothetical event summaries.
  • Identify when a prespecified time weight strengthens or weakens the score for a clinically relevant period.
  • Recognize diagnostics, assumptions, and limitations of weighted logrank analyses under crossing effects.

Why Reversals Make Weighting Consequential

A logrank score accumulates evidence across event times. When the treatment effect changes direction, those contributions can oppose one another: fewer treatment-arm events early may favor treatment, while more treatment-arm events later may favor control. The ordinary logrank test combines both periods, so opposing evidence can partly cancel. A time weight changes how much each period contributes; it does not make the underlying reversal disappear.

The central question is not simply whether a weight is “early” or “late.” It is whether the periods emphasized by that weight have contributions in the direction of the treatment contrast that matters. Emphasizing an early benefit can strengthen an early-benefit score, but can also obscure substantial later harm. Conversely, emphasizing a harmful period can reverse the direction of the combined score.

Signed Contributions and Their Assumptions

Definition: At event time \(t_j\), let \(Y_{Tj}\) and \(Y_{Cj}\) be the numbers at risk in the treatment and control groups just before the event time, and let \(d_{Tj}\) and \(d_j\) be the treatment-group and total numbers of events at that time. The ordinary logrank contribution for treatment, using the observed-minus-expected convention, is $$ u_j=d_{Tj}-\frac{Y_{Tj}}{Y_{Tj}+Y_{Cj}}d_j. $$ For a prespecified nonnegative time weight \(w_j\), the weighted contribution is \(w_j u_j\), and the weighted score is \(U_w=\sum_j w_j u_j\). With this convention, negative contributions favor fewer events in the treatment group; positive contributions favor fewer events in the control group.

Under the null hypothesis of equal event hazards in randomized groups, the usual variance estimate for the weighted score is

$$ V_w=\sum_j w_j^2 \frac{Y_{Tj}Y_{Cj}d_j(Y_{Tj}+Y_{Cj}-d_j)} {(Y_{Tj}+Y_{Cj})^2(Y_{Tj}+Y_{Cj}-1)}. $$

When each event increment is small relative to the risk set, the finite-risk-set correction is close to one, and the contribution to the variance is approximately \(w_j^2 d_j\pi_j(1-\pi_j)\), where \(\pi_j=Y_{Tj}/(Y_{Tj}+Y_{Cj})\). The corresponding standardized statistic is \(Z_w=U_w/\sqrt{V_w}\). The score’s sign indicates its direction under the stated convention; a two-sided test uses its magnitude.

These formulas require a well-defined event outcome and comparable event-time follow-up between randomized groups. In particular, censoring should be independent of the event process, at least conditional on any factors used in the analysis, and the risk sets and event times must be recorded correctly. Randomization supports the null comparison, but it does not guarantee independent censoring. If censoring depends on prognosis differently by treatment, ordinary logrank weighting may not repair the resulting bias.

The weight function should be specified independently of the observed treatment-effect pattern if the usual null calibration is to apply. Data-driven selection of a weight after inspecting which period looks most favorable can make the nominal significance level unreliable unless that selection is accounted for. Positive weights preserve the sign of each period’s contribution; they alter its relative influence in the total score.

Why Opposing Contributions Arise

The direction of a period’s expected score can be seen by considering a short interval with treatment risk-set fraction \(\pi=Y_T/(Y_T+Y_C)\). If the group hazards in that interval are \(\lambda_T\) and \(\lambda_C\), the fraction of events expected to occur in the treatment group is approximately

$$ q=\frac{\pi\lambda_T}{\pi\lambda_T+(1-\pi)\lambda_C}. $$

For a small interval with \(d\) events, the expected observed-minus-expected contribution is approximately \(d(q-\pi)\). If \(\lambda_T<\lambda_C\), then \(q<\pi\), so the contribution tends to be negative and favors treatment under this sign convention. If \(\lambda_T>\lambda_C\), then \(q>\pi\), and the contribution tends to be positive. Reversing the relative hazards can therefore reverse the expected score contribution.

This argument explains the direction, not a guarantee about any particular realized data set. Sampling variability can produce a contribution with the opposite sign, particularly when there are few events in a period. It also does not imply that every participant experiences a changing effect: the reversal concerns the relative hazards over time in the populations being compared.

Worked Example: Early Benefit, Later Harm, and an Early Weight

Consider a hypothetical trial summarized in two event periods. Suppose risk sets are large enough that the null variance can be approximated by \(d_j/4\) in each period, as would occur with approximately equal risk-set allocation and small event increments. In the early period there are 40 events, 14 in treatment and 26 in control. In the later period there are 60 events, 35 in treatment and 25 in control. Use weights 2 early and 0.5 late.

The expected treatment events under the null are half of the total in each period. Thus the early contribution is \(14-40/2=-6\), and the later contribution is \(35-60/2=5\). The signs are consistent with an early treatment benefit and a later treatment disadvantage in these hypothetical summaries.

The unweighted score is \(U=-6+5=-1\). The weighted score is

$$ U_w=2(-6)+0.5(5)=-12+2.5=-9.5. $$

The approximate null variance is \(V=40/4+60/4=25\) without weighting. With weighting, each variance contribution is multiplied by the squared weight:

$$ V_w=2^2(40/4)+0.5^2(60/4)=40+3.75=43.75. $$

Therefore \(Z_w=-9.5/\sqrt{43.75}=-1.436\), approximately. The negative sign points toward fewer treatment events under the chosen convention. Weighting has made the score more reflective of the early period, but the statistic alone does not establish that the treatment is beneficial throughout follow-up. These approximate calculations are for illustration; an analysis would use the event-time risk sets and the appropriate variance estimate.

When Weighting Helps—and When It Hurts

Weighting can help when the scientific question gives a defensible priority to a period and the weight emphasizes that period. For instance, if an early treatment effect is especially relevant and the expected early benefit is supported by prior evidence, an early-emphasizing weight may reduce dilution by later contributions. This is a choice of estimand and analysis emphasis, not proof that later outcomes are unimportant.

Weighting can hurt when it gives extra influence to a period with an effect opposite to the intended contrast, or when the chosen time emphasis does not match the actual pattern. It can also increase variance: since the variance uses \(w_j^2\), doubling a period’s weight multiplies that period’s variance contribution by four. A larger weighted score does not automatically mean stronger statistical evidence.

Worked Example: Equal and Opposing Period Scores

Suppose a different hypothetical trial has an early score contribution of \(-8\) and a later contribution of \(+8\), with null variance contributions of 20 in each period. These summaries represent exact cancellation in the ordinary score:

$$ U=-8+8=0,\qquad V=20+20=40. $$

The ordinary standardized statistic is \(Z=0/\sqrt{40}=0\). Now consider weights 2 early and 0.5 late. Then

$$ U_w=2(-8)+0.5(8)=-16+4=-12, $$ $$ V_w=2^2(20)+0.5^2(20)=80+5=85,\qquad Z_w=-12/\sqrt{85}=-1.301. $$

The weighted score no longer cancels, and its direction favors treatment. But the example does not show that the weight is universally better: it shows that the weight has prioritized the early period. If the later disadvantage were the more important clinical concern, this weighting would understate it. The statistic’s interpretation must name the time emphasis as well as the direction.

Worked Example: A Late Weight Can Emphasize the Unfavorable Period

Suppose a third hypothetical trial has an early contribution of \(-4\) and a later contribution of \(+12\), with variance contributions 16 and 36, respectively. The ordinary score and its standardized value are

$$ U=-4+12=8,\qquad V=16+36=52,\qquad Z=8/\sqrt{52}=1.109. $$

Now assign weight 0.5 early and 2 late. The weighted quantities are

$$ U_w=0.5(-4)+2(12)=-2+24=22, $$ $$ V_w=0.5^2(16)+2^2(36)=4+144=148,\qquad Z_w=22/\sqrt{148}=1.809. $$

The positive score favors fewer control events under the defined convention, so the weighted result emphasizes the period whose observed contribution is unfavorable to treatment. Although the weighted standardized statistic is larger in magnitude, this is not evidence that late weighting is inherently more powerful or appropriate. Its direction and relevance depend on the clinical question and on whether the late pattern is credible and prespecified.

Reading the Score Across Time

For interpretation, it is useful to inspect the period-specific contributions as well as the final total. A running score \(U_w(k)=\sum_{j\leq k}w_j u_j\) shows how evidence accumulates through event time. Under crossing effects, that trajectory can move in one direction early and then turn back. A final score near zero may therefore reflect cancellation, not an absence of time-specific differences.

In a group sequential setting, the same issue applies to interim results: a cumulative statistic can change direction as later events accrue. The weight and the analysis plan need to be defined for the intended monitoring procedure, and the sequential error control must correspond to that procedure. Interpreting an interim reversal as an error, or treating a favorable early excursion as conclusive without regard to the planned boundaries, is not justified.

Useful diagnostics include plotting the unweighted and weighted cumulative scores against event time, displaying the prespecified weight function, and reporting the signs of contributions over clinically meaningful periods. These displays can reveal whether a final statistic is dominated by one short interval, whether its direction changes late, or whether there are too few events in a period to support a stable pattern. Such checks describe the evidence; they do not license choosing a more favorable weight after seeing the results.

Comparison, Limitations, and a Common Mistake

ApproachHow it combines periodsMain consideration under crossing effects
Ordinary logrank testUses equal event-time weightsOpposing contributions can cancel; it does not prioritize a period.
Prespecified weighted logrank testGives some event times more influence than othersCan emphasize a justified time period, but can obscure an opposing effect elsewhere.
Separate period summariesReports contributions or estimates by time periodMakes reversals visible, but separate summaries are not automatically a single calibrated test.

Weighted logrank tests remain tests of a weighted event-time contrast, not direct summaries of every clinically relevant feature of survival. A single score compresses a potentially complex pattern into one number. Its value depends on the weight’s scientific justification, adequate event information across the emphasized periods, correct risk-set calculations, and the censoring assumptions. The score does not by itself estimate the size of a treatment effect at every time or describe survival probabilities in a way that is independent of the weighting choice.

Common mistake: “The early-weighted test is significant, so treatment helps throughout follow-up.” That conclusion does not follow. An early-weighted score gives early contributions more influence, and a late contribution can still indicate harm. The correction is to report the weighting rule, score direction, and time-specific pattern, and to state the conclusion only for the contrast the prespecified analysis supports.

Key takeaway: With the observed-minus-expected treatment convention, negative contributions favor treatment and positive contributions favor control. Under crossing effects, weights alter the balance of those signed contributions, and squared weights alter their variance. A useful weight is justified by the scientific question before the outcome pattern is inspected.

Check Your Understanding

Answer each question using the observed-minus-expected treatment score convention in this tutorial. Full solutions follow the questions.

  1. In a period with 50 events and equal treatment and control risk sets, 20 events occur in treatment. What is the score contribution, and which group does its sign favor?
  2. A score has contributions \(-5\) early and \(+7\) late. What is the unweighted total, and what would weights 2 early and 0.5 late make the weighted total?
  3. If a period’s weight changes from 1 to 3, by what factor does that period’s approximate variance contribution change?
  4. Why can a weighted standardized statistic be less extreme than the corresponding unweighted statistic even when weighting increases the absolute score?
  5. What is a key interpretation error when an early-weighted score favors treatment but later contributions favor control?

Solutions. (1) The null-expected treatment events are \(50/2=25\), so the contribution is \(20-25=-5\), favoring fewer treatment events. (2) The unweighted total is \(-5+7=2\); the weighted total is \(2(-5)+0.5(7)=-6.5\). (3) Variance uses the squared weight, so the factor is \(3^2/1^2=9\). (4) The weight changes both the score and its variance; the standardized statistic divides the score by the square root of that variance, so an increased absolute score need not yield a more extreme statistic. (5) It is incorrect to claim that treatment helps throughout follow-up. The early-weighted result emphasizes early contributions and does not erase later evidence in the opposite direction.

Clinical Biostats