Tutorials › Group Sequential Methods and Sample Size Re-Estimation › Calculating Weighted Logrank Power Under a Lag

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

Calculating Weighted Logrank Power Under a Lag

Learn to calculate weighted logrank power under a prespecified treatment-effect lag, using arm-specific expected risk sets and comparing the consequences of different weight functions.

Advanced 11 min read

What You'll Learn

  • Express a delayed treatment effect as piecewise arm-specific hazards.
  • Calculate the expected weighted logrank score and its null variance over intervals.
  • Use arm-specific survival and censoring to determine expected risk sets.
  • Convert the score mean and variance into an approximate noncentrality parameter and power.
  • Compare ordinary and late-emphasizing weights, and recognize when a weight choice can reduce power.
  • Check the assumptions and approximations behind a planned power calculation.

Why calculate power under a lag?

When a treatment effect begins only after a delay, a single hazard ratio can conceal the pattern that matters for a weighted logrank test. Early events may contribute little or nothing to the expected score for benefit, while later events contribute a systematic signal. Power therefore depends not only on the size of the later effect, but also on how many participants remain at risk then and on the weight assigned to those events.

The calculation below uses the piecewise change-point hazard model from the earlier material on modeling delayed effects. The onset time and the weight function are treated as prespecified. The aim is to calculate the approximate mean and variance of the weighted logrank score under that alternative, then use them to approximate power.

Definition: Let group 0 be control and group 1 be treatment, and define the weighted logrank score as the weighted number of treatment events minus their expected number under \(H_0\). A negative score favors treatment. Under a piecewise delayed-effect alternative, the arm-specific hazards are constant within each time interval but may differ between arms after the prespecified lag.

Model, risk sets, and score approximation

Write the intervals as \(j=1,\ldots,J\), with interval \(j\) of length \(\Delta_j\). Within that interval, let \(\lambda_{0j}\) and \(\lambda_{1j}\) be the control and treatment hazard rates, and let \(Y_{0j}\) and \(Y_{1j}\) be representative expected numbers at risk. The treatment effect is delayed until a specified change point: before it, \(\lambda_{1j}=\lambda_{0j}\); after it, the hazards may differ. For a beneficial treatment, a common post-lag specification is \(\lambda_{1j}=\theta\lambda_{0j}\), where \(0<\theta<1\).

The expected risk sets must be calculated separately by arm. Under independent, non-informative censoring within each arm, the expected number at risk at time \(t\) depends on the number enrolled in that arm, its survival function, and its censoring pattern. With a common entry time, for example, it is \(n_g S_g(t)G_g(t)\) for arm \(g\), where \(S_g\) is survival and \(G_g\) is censoring survival. With staggered entry, expected risk sets also account for the entry-time distribution. Different hazards or censoring patterns can make the risk-set allocation ratio differ from the enrollment allocation ratio; it must not simply be assumed to stay fixed.

For the interval approximation, define the harmonic risk-set quantity \(A_j\) and the pooled event rate \(q_j\) as follows:

$$ A_j=\frac{Y_{0j}Y_{1j}}{Y_{0j}+Y_{1j}}, \qquad q_j=\frac{Y_{0j}\lambda_{0j}+Y_{1j}\lambda_{1j}}{Y_{0j}+Y_{1j}}. $$

If \(w_j\) is the weight in interval \(j\), the first-order expected score contribution is \(w_j A_j(\lambda_{1j}-\lambda_{0j})\Delta_j\). The corresponding null-variance contribution is approximately \(w_j^2 A_j q_j\Delta_j\). Thus the total mean \(\mu_w\), variance \(V_w\), and signed noncentrality parameter \(\delta_w\) are approximated by:

$$ \mu_w\approx\sum_{j=1}^{J}w_j A_j(\lambda_{1j}-\lambda_{0j})\Delta_j, \qquad V_w\approx\sum_{j=1}^{J}w_j^2 A_jq_j\Delta_j, \qquad \delta_w=\frac{\mu_w}{\sqrt{V_w}}. $$

These expressions use a large-sample normal approximation and representative risk sets and hazards within each interval. With time-varying risk sets, the corresponding continuous-time expressions integrate the risk-set and hazard terms over time. In either form, the variance used for the usual logrank power approximation is the null variance. A standard two-sided level-\(\alpha\) test has approximate power \(P(Z<-z_{1-\alpha/2})+P(Z>z_{1-\alpha/2})\), where \(Z\) is approximately \(N(\delta_w,1)\). For a prespecified one-sided test for treatment benefit, power is approximately \(\Phi(-z_{1-\alpha}-\delta_w)\).

Why the score mean has this form

A short derivation clarifies both the sign and the risk-set factor. In a small time increment \(dt\), the expected treatment events are \(Y_1\lambda_1dt\), while total expected events are \((Y_0\lambda_0+Y_1\lambda_1)dt\). Under the null, the expected treatment share of those events is \(Y_1/(Y_0+Y_1)\). The alternative mean of the unweighted score increment is therefore:

$$ Y_1\lambda_1dt -\frac{Y_1}{Y_0+Y_1}(Y_0\lambda_0+Y_1\lambda_1)dt = \frac{Y_0Y_1}{Y_0+Y_1}(\lambda_1-\lambda_0)dt. $$

Multiplying by \(w(t)\) gives the weighted mean increment. Under the null, the treatment event count has the event-allocation variance associated with the two risk sets; to first order this is \(\{Y_0Y_1/(Y_0+Y_1)\}\lambda\,dt\). Replacing the common null event rate by the pooled rate \(q(t)\) gives the usual planning approximation to the variance under the alternative. The weight enters squared because variance scales with the square of a score contribution.

Worked Example: A Lagged Effect With Two Intervals

Consider a hypothetical balanced trial with two one-year intervals. For a simple interval approximation, suppose the representative expected risk sets are 100 per arm in year 1 and 80 per arm in year 2. Hazards are 0.10 per year in both arms in year 1; in year 2 they are 0.10 per year in control and 0.05 per year in treatment. Compare the ordinary weight \(w=(1,1)\) with a late-only weight \(w=(0,1)\). The risk-set values are inputs to the approximation, not an assumption that the allocation ratio remains constant in general.

In year 1, \(A_1=100(100)/200=50\), \(q_1=0.10\), and \(\lambda_{11}-\lambda_{01}=0\). The mean contribution is 0 and the variance contribution for weight 1 is \(50(0.10)(1)=5\).

In year 2, \(A_2=80(80)/160=40\), and \(q_2=\{80(0.10)+80(0.05)\}/160=0.075\). The mean contribution for weight 1 is \(40(0.05-0.10)(1)=-2.000\); its variance contribution is \(40(0.075)(1)=3.000\).

For ordinary weights, \(\mu_w=-2.000\), \(V_w=5+3=8.000\), and \(\delta_w=-2/\sqrt{8}=-0.7071\). For the late-only weight, the year 1 contribution is removed, giving \(\mu_w=-2.000\), \(V_w=3.000\), and \(\delta_w=-2/\sqrt{3}=-1.155\). The late-only test has a larger absolute noncentrality in this example because it avoids spending variance on events from the interval with no treatment effect. This comparison is illustrative; the best weight depends on the full event and risk-set pattern.

Unequal risk sets and weight scaling

Equal randomization at enrollment does not guarantee equal numbers at risk at later times. The following calculation uses unequal expected risk sets to show how they enter the score and variance directly. A weight that is multiplied by the same positive constant in every interval changes the score and its standard deviation by that constant, so it does not change \(\delta_w\). Changing the relative weights across intervals can change power.

Worked Example: Post-Lag Events With Unequal Risk Sets

Suppose that in a hypothetical one-year post-lag interval the expected risk sets are \(Y_0=78\) and \(Y_1=72\), with hazards \(\lambda_0=0.08\) and \(\lambda_1=0.04\) per year. Use weight \(w=1\). These expected risk sets can arise from arm-specific survival and censoring; they need not match the enrollment ratio.

First calculate \(A=78(72)/(78+72)=5616/150=37.44\). The pooled event rate is \(q=\{78(0.08)+72(0.04)\}/150=(6.24+2.88)/150=0.06080\) per year. With \(\Delta=1\), the expected score is \(\mu_w=37.44(0.04-0.08)=-1.4976\), and the variance is \(V_w=37.44(0.06080)=2.276352\).

Therefore \(\delta_w=-1.4976/\sqrt{2.276352}\approx-0.9926\). If the weight were instead \(w=1.5\), the mean would be \(-2.2464\) and the variance would be \(1.5^2(2.276352)=5.121792\); dividing by the new standard deviation gives the same noncentrality, approximately \(-0.9926\). This invariance applies only to multiplying all weights by the same positive constant; multiplying all weights by a negative constant preserves \(|\delta_w|\) but reverses its sign. Neither form of scaling changes the relative weight pattern over time.

How a late-emphasizing weight changes power

The practical comparison is usually between different relative time weights, not two constant multiples of the same weights. A late-emphasizing weight can improve power when the effect is truly delayed: it downweights early events that add variance without a treatment-related mean score, and upweights later events that contribute in the direction of benefit. But later risk sets may be small, and late weighting also squares the weights in the variance. The net effect must be calculated rather than assumed.

Worked Example: Ordinary Versus Late-Emphasizing Weights

Use the following hypothetical three-interval design, with each interval one year long. The expected risk sets and hazards are representative within each interval. In intervals 1 and 2, both arms have hazard 0.06 per year. In interval 3, control has hazard 0.06 and treatment has hazard 0.03 per year.

Interval\(Y_0\)\(Y_1\)\(\lambda_0\)\(\lambda_1\)
11001000.060.06
280760.060.06
360550.060.03

For interval 1, \(A_1=50\), \(q_1=0.06\), so the mean contribution is 0 and the unit-weight variance contribution is \(50(0.06)=3.000\). For interval 2, \(A_2=6080/156=38.9744\), \(q_2=0.06\), giving mean 0 and variance \(38.9744(0.06)=2.3385\).

For interval 3, \(A_3=3300/115=28.6957\), and \(q_3=\{60(0.06)+55(0.03)\}/115=5.25/115=0.0456522\). The unit-weight mean is \(28.6957(0.03-0.06)=-0.8609\); the variance contribution is \(28.6957(0.0456522)=1.3100\).

With ordinary weights \((1,1,1)\), the total mean is \(-0.8609\), the variance is approximately \(3.000+2.3385+1.3100=6.6485\), and \(\delta_w=-0.8609/\sqrt{6.6485}\approx-0.3339\). Now use the late-emphasizing weights \((0.5,1,2)\). The mean is approximately \(-1.7217\); the variance is approximately \(0.5^2(3.000)+1^2(2.3385)+2^2(1.3100)=8.3285\). Thus \(\delta_w=-1.7217/\sqrt{8.3285}\approx-0.5966\), using unrounded values for the calculation.

For a two-sided test at \(\alpha=0.05\), the approximate powers are about 0.063 for \(\delta_w=-0.3339\) and 0.092 for \(\delta_w=-0.5966\). These values use the normal approximation with critical value 1.96. In this example the late-emphasizing weights improve power because the late signal is emphasized while an interval with no treatment effect is downweighted. They are not a universal improvement: a different onset, hazard pattern, or late risk-set size could reverse the comparison.

Assumptions, diagnostics, and limitations

A planned calculation is credible only if its inputs represent the intended design and alternative. Check that the delay, post-lag hazard ratio, baseline hazard pattern, accrual, and censoring assumptions are stated in time units and match the intended follow-up. Calculate expected risk sets from arm-specific survival and censoring patterns. In particular, do not multiply a single pooled risk-set curve by the enrollment allocation fractions when treatment and control survival or censoring differ.

Useful diagnostic checks include confirming that hazards and weights are defined on the same intervals, that \(A_j\) is positive whenever both arms have participants at risk, and that the sign of every mean contribution agrees with the chosen score convention. Under treatment benefit and positive weights, a post-lag interval should contribute a nonpositive mean to the treatment-minus-control score. Recalculate the result using finer time intervals if hazards, risk sets, or weights change substantially within an interval. Large differences between coarse and fine partitions warn that the representative-value approximation is inadequate.

The calculation is an approximation, not a guarantee of realized power. It relies on a large-sample normal approximation, a specified hazard and censoring model, and a variance approximation based on the null logrank variance. Sparse events, heavy censoring, very small risk sets, delayed entry, or strong departures from the assumed event pattern can impair accuracy. Simulations using the planned accrual, censoring, event process, and exact test implementation can be useful when the normal approximation is doubtful.

The main alternative within this calculation is to use ordinary logrank weights rather than a weight tailored to the prespecified delay. Ordinary weights are less dependent on a particular timing pattern, but can spend variance on early events that carry little mean signal under a lag. Late-emphasizing weights can target the delayed pattern, but may lose power if the effect begins earlier than expected or if few participants remain at risk late. A weighted logrank power calculation quantifies the consequences under its assumed model; it does not make the weight robust to an incorrectly specified effect pattern.

Common mistake

A frequent error is to assume that equal randomization means equal expected risk sets at every follow-up time, then use that assumed ratio in the score calculation. The correction is to calculate each arm’s expected risk set from its own survival, censoring, and entry patterns. Another error is to multiply the variance by \(w_j\), rather than \(w_j^2\); the score is multiplied by \(w_j\), so its variance is multiplied by \(w_j^2\). Finally, a larger absolute score mean alone does not establish higher power: compare \(|\mu_w|/\sqrt{V_w}\), because weighting changes both mean and variance.

Key takeaway: Under a prespecified delayed-effect model, approximate weighted logrank power by summing interval-specific score means and null-variance contributions using arm-specific expected risk sets. A weight improves power only when its effect on the standardized signal, \(\delta_w=\mu_w/\sqrt{V_w}\), is favorable under the assumed alternative.

Check Your Understanding

Use the score convention and interval approximation defined above. The solutions are included after the questions.

  1. If treatment and control hazards are equal in an interval, what is that interval’s expected score contribution, even when its weight is positive?
  2. For \(Y_0=50\), \(Y_1=50\), \(\lambda_0=0.08\), \(\lambda_1=0.04\), \(w=1\), and \(\Delta=1\), calculate \(A\), \(q\), the mean contribution, and the variance contribution.
  3. Why can the expected treatment-to-control risk-set ratio differ from the enrollment allocation ratio after the lag?
  4. What happens to \(\delta_w\) if every weight is multiplied by the same positive constant?

Solutions. (1) It is zero because \(A_j(\lambda_{1j}-\lambda_{0j})=0\). (2) \(A=50(50)/100=25\); \(q=\{50(0.08)+50(0.04)\}/100=0.06\); the mean is \(25(0.04-0.08)=-1.000\), and the variance is \(25(0.06)=1.500\). (3) Arm-specific hazards and censoring can cause the numbers remaining at risk to change at different rates. (4) It is unchanged: multiplying all weights by \(c>0\) multiplies \(\mu_w\) by \(c\) and \(V_w\) by \(c^2\), so their ratio \(\mu_w/\sqrt{V_w}\) is unchanged.

Clinical Biostats