Tutorials › Group Sequential Methods and Sample Size Re-Estimation › Risk-Set Contributions To The Logrank Score

Group Sequential Logrank Tests · Tutorial 481 of 699

Risk-Set Contributions To The Logrank Score

You will calculate event-level observed-minus-expected contributions and see how risk-set composition, censoring, and event timing determine the cumulative logrank score.

Advanced 11 min read

What You'll Learn

  • Define the treatment and control risk sets immediately before an event.
  • Derive the null expected treatment event count at a distinct event time.
  • Calculate and sum event-level logrank score contributions.
  • Explain how censoring affects later risk sets without contributing an event.
  • Diagnose common risk-set, arithmetic, and interpretation errors.

Why the Risk Set Matters

A logrank score is not obtained simply by subtracting the total number of control events from the total number of treatment events. Participants have different amounts of time at risk, and the treatment-to-control balance among participants still at risk can change over follow-up. At each event time, the relevant comparison is between the observed treatment event and the number expected under the null hypothesis, given the treatment composition of that event's risk set.

This tutorial develops that event-level calculation. It uses the two-sample setting: participants are assigned to treatment or control, and the outcome is time to an event of interest. The focus is on how each distinct event time contributes to the cumulative score, not on its variance or standardization.

Definition: Immediately before event time \(t_j\), let \(Y_{1j}\) be the number of treatment participants at risk, \(Y_{0j}\) the number of control participants at risk, and \(Y_j=Y_{1j}+Y_{0j}\) the total number at risk. For one event at \(t_j\), let \(D_{1j}=1\) if the event is in the treatment group and \(D_{1j}=0\) if it is in the control group. The event-level logrank score contribution is \(D_{1j}-Y_{1j}/Y_j\).

A participant is at risk immediately before \(t_j\) if that participant has entered follow-up and has not had the event of interest or been censored before \(t_j\). The risk set is determined at that instant, before removing the participant who experiences the event. Thus, the event participant is included in the denominator and in the count for their assigned group.

Deriving the Observed-Minus-Expected Contribution

Assume that event times are distinct, so exactly one participant experiences the event at each event time considered. Under the null hypothesis \(H_0\), the treatment and control groups have the same event hazard at a given time. Also assume censoring does not selectively remove participants according to their unobserved event risk, within treatment group, and that event and censoring times are recorded correctly. Under these conditions, conditional on one event occurring at \(t_j\), each person in the risk set has the same instantaneous chance of being the one who experiences it under \(H_0\).

There are \(Y_{1j}\) treatment participants among the \(Y_j\) participants at risk. Therefore the conditional probability that the event is in the treatment group is \(Y_{1j}/Y_j\). Since \(D_{1j}\) is 1 for a treatment event and 0 otherwise, it is an indicator for a treatment event. Its conditional expectation under \(H_0\) is the treatment event probability:

$$ E(D_{1j}\mid \text{risk set at }t_j,H_0)=\frac{Y_{1j}}{Y_j}. $$

The observed treatment event count at this single event time is \(D_{1j}\), and its null expectation is \(Y_{1j}/Y_j\). Subtracting expected from observed gives the contribution:

$$ \Delta U_j=D_{1j}-\frac{Y_{1j}}{Y_j}. $$

For a treatment event, the contribution is \(1-Y_{1j}/Y_j=Y_{0j}/Y_j\), which is positive. For a control event, it is \(0-Y_{1j}/Y_j=-Y_{1j}/Y_j\), which is negative. The contribution's magnitude depends on the risk-set composition: a treatment event is more unexpected when few treatment participants are at risk, while a control event is more unexpected when few control participants are at risk.

If \(K\) distinct event times have occurred by an analysis look, the cumulative logrank score is the sum of their contributions:

$$ U_K=\sum_{j=1}^{K}\left(D_{1j}-\frac{Y_{1j}}{Y_j}\right) =\sum_{j=1}^{K}D_{1j}-\sum_{j=1}^{K}\frac{Y_{1j}}{Y_j}. $$

The first sum is the observed number of treatment events. The second is the sum of the event-by-event null expectations. In general, that expected total is not calculated from the overall fraction randomized to treatment: it uses the risk-set fraction at each event time.

1
Form the risk set.
At each distinct event time, count treatment and control participants still at risk immediately before the event.
2
Find the null expectation.
Divide the treatment risk-set count by the total risk-set count, \(Y_{1j}/Y_j\).
3
Subtract expected from observed.
Use \(D_{1j}=1\) for a treatment event and \(D_{1j}=0\) for a control event.
4
Accumulate the score.
Add contributions over the event times included at the analysis look.

Event-Level Calculations

Worked Example: One Treatment Event in a 3-to-7 Risk Set

Suppose that immediately before a distinct event time, 3 treatment participants and 7 control participants are at risk. A treatment participant has the event. Calculate the contribution.

The total risk set is \(Y_j=3+7=10\), and the observed treatment event indicator is \(D_{1j}=1\). Under \(H_0\), the expected treatment event count at this one-event time is \(Y_{1j}/Y_j=3/10=0.30\). Therefore:

$$ \Delta U_j=1-\frac{3}{10}=0.70. $$

The contribution is \(+0.70\) treatment events relative to the null expectation for this event time. It is not a risk difference, a probability of benefit, or a treatment effect measured in units of survival time.

Worked Example: Equal Event Counts, Unequal Risk-Set Expectations

In a hypothetical trial, four distinct events occur. At the first event, 4 treatment and 6 control participants are at risk, and the event is in treatment. At the second, 3 treatment and 6 control participants are at risk, and the event is in control. Before the third event, one control participant is censored, leaving 3 treatment and 4 control participants at risk; the event is in control. At the fourth event, 3 participants in each group are at risk, and the event is in treatment. Find the cumulative score.

The four contributions are calculated from the risk set immediately before each event:

$$ \begin{aligned} \Delta U_1&=1-\frac{4}{10}=0.6000,\\ \Delta U_2&=0-\frac{3}{9}=-0.3333,\\ \Delta U_3&=0-\frac{3}{7}=-0.4286,\\ \Delta U_4&=1-\frac{3}{6}=0.5000. \end{aligned} $$

Adding them gives \(U_4=0.6000-0.3333-0.4286+0.5000=0.3381\), up to rounding. There are two observed treatment events. The sum of their null expectations is \(4/10+3/9+3/7+3/6=1.6619\), so the same result follows from \(2-1.6619=0.3381\). Equal observed event counts in the two groups do not force a zero score: the risk-set proportions, and thus the expected treatment event count, differed across event times.

Worked Example: Censoring Changes Later Contributions

Consider a hypothetical follow-up with 5 treatment and 5 control participants at risk before the first event. The event is in treatment. Before the second event, two control participants are censored; the event at that time is in control. Before the third event, one treatment participant is censored; the event is in treatment. Calculate each contribution and the cumulative score through the third event.

At the first event, \(Y_{1,1}=5\), \(Y_{0,1}=5\), and \(D_{1,1}=1\), so \(\Delta U_1=1-5/10=0.5000\). After that treatment event, 4 treatment and 5 control participants remain. Two control censorings leave 4 treatment and 3 control participants at risk before the second event. Thus, \(\Delta U_2=0-4/7=-0.5714\).

After the control event, 4 treatment and 2 control participants remain. One treatment censoring leaves 3 treatment and 2 control participants at risk before the third event. That event is in treatment, so \(\Delta U_3=1-3/5=0.4000\). The cumulative score is \(U_3=0.5000-0.5714+0.4000=0.3286\), up to rounding.

Censorings do not appear as events in the score. They change the group counts available for later risk sets, which can change later expected treatment event counts. The example's sequence of risk sets accounts for each event and censoring before the next event.

Interpretation, Diagnostics, and Alternatives

A positive cumulative \(U_K\) means that, over the included event times, the observed number of treatment events exceeds the sum of the event-specific null expectations. A negative value means it is below that sum. This sign describes the direction of the observed-minus-expected score under the stated treatment-minus-control convention. By itself, it does not give a p-value, quantify uncertainty, or establish a clinically meaningful difference.

At an interim analysis, only events that have occurred by that look contribute to the cumulative score. Each included contribution must use the risk set at its own event time; later risk sets cannot be used to recalculate earlier contributions. In a sequential trial, these event-level contributions are the pieces accumulated into the logrank statistic at a look.

The main alternatives answer related but different questions. A raw comparison of total event counts ignores how the risk-set balance changed over follow-up. A person-time rate comparison uses total time at risk, but does not generally reproduce the event-by-event logrank expected counts. A weighted logrank approach changes the weights assigned to event times; it can target different patterns of treatment effects, but it is not the unweighted contribution defined here.

The logrank score is most directly interpretable as a single overall comparison when a common relative hazard is a reasonable summary over time. If treatment effects vary over time, positive and negative contributions can offset, so a modest cumulative score need not mean that the groups behaved similarly at every time. The unweighted score also does not describe the shape of a survival curve or replace examination of the event-time pattern.

Common pitfall: It is incorrect to use the fraction randomized to treatment as the expected treatment event count at every event time. The correction is to use \(Y_{1j}/Y_j\), calculated from participants still at risk immediately before that event. The randomized fraction need not match the risk-set fraction after events and censoring.

A useful diagnostic is to audit the event-time ledger. Confirm that each \(Y_{1j}\) and \(Y_{0j}\) is counted just before the event, that the event participant is included, and that earlier events and censorings have been removed from later risk sets. Check that each treatment event contributes a positive amount and each control event a negative amount. If event times are tied, the single-event expression above is not automatically the correct tied-event calculation; tied-event handling requires a separate method.

Check Your Understanding

For each question, first identify the risk set at the event time. Solutions are included below.

  1. There are 2 treatment and 6 control participants at risk, and the event is in control. What is the contribution?
  2. There are 8 treatment and 2 control participants at risk, and the event is in treatment. What is the contribution?
  3. Explain why a censoring before an event can affect that event's contribution even though a censoring is not itself an event contribution.
  4. At two successive event times, the risk sets are 5 treatment and 5 control, then 3 treatment and 5 control. The first event is in control and the second is in treatment. Calculate the cumulative score.

Solutions. (1) \(0-2/8=-0.2500\). (2) \(1-8/10=0.2000\). (3) Censoring removes a participant from subsequent risk sets; this can change the treatment fraction \(Y_{1j}/Y_j\) used for the later event's null expectation, but the censoring itself has no \(D_{1j}\) event indicator. (4) The first contribution is \(0-5/10=-0.5000\); the second is \(1-3/8=0.6250\). Thus the cumulative score is \(0.1250\).

Clinical Biostats