Tutorials › Group Sequential Methods and Sample Size Re-Estimation › The Two-Sample Logrank Statistic At A Look

Group Sequential Logrank Tests · Tutorial 480 of 699

The Two-Sample Logrank Statistic At A Look

Calculate and interpret a cumulative two-sample logrank statistic at one interim analysis, using the risk sets and event data available at that look.

Advanced 12 min read

What You'll Learn

  • Define the cumulative observed-minus-expected logrank score at an interim look.
  • Calculate expected treatment events and variance contributions for untied event times.
  • Standardize the cumulative score and interpret its direction and approximate p-value.
  • Check risk-set counts and retain unrounded values until the final calculation.
  • Recognize limitations from sparse data, ties, censoring, and non-proportional hazards.

Why Calculate the Logrank Statistic at a Look?

In an event-driven survival trial, an interim analysis may be scheduled after a specified number of events or after an information target is reached. At that point, the relevant question is not simply how many events occurred in each group. Participants can have different amounts of follow-up, and the groups’ sizes among participants still at risk can change over time. The two-sample logrank statistic compares observed treatment-group events with the events expected from the treatment group’s share of each risk set.

This tutorial calculates the statistic using untied event times. It focuses on the cumulative result available at one look: all qualifying events observed from the beginning of follow-up through the look’s cutoff are included. A statistic at one look is not, by itself, a group-sequential decision rule. A trial’s prespecified monitoring boundary or other inferential procedure is needed to interpret repeated interim testing while controlling the overall type I error rate.

Definition: Immediately before event time \(j\), let \(n_{Tj}\) and \(n_{Cj}\) be the numbers at risk in the treatment and control groups, and let \(n_j=n_{Tj}+n_{Cj}\). For an untied event, let \(x_j=1\) if the event occurred in the treatment group and \(x_j=0\) otherwise. The treatment-group observed-minus-expected logrank score through a look is \(U=O_T-E_T\), where \(O_T=\sum_j x_j\) is the observed number of treatment-group events and \(E_T=\sum_j n_{Tj}/n_j\) is the number expected under the null hypothesis.

Expected Events, Variance, and Standardization

At each untied event time, the risk set contains everyone who has not yet had the event or been censored. Under the null hypothesis of equal event experience between groups, and conditional on one event occurring in that risk set, each person in it has the same chance of being the person with the event. The probability that the event is in the treatment group is therefore \(n_{Tj}/n_j\). This gives that event a treatment-group expected count of \(E_{Tj}=n_{Tj}/n_j\).

The event’s treatment-group indicator has a Bernoulli variance of \(p(1-p)\), with \(p=n_{Tj}/n_j\). Thus its variance contribution is \(V_j=(n_{Tj}/n_j)(n_{Cj}/n_j)\). Summing the expected counts and variance contributions over all events included at the look gives the cumulative quantities. The variance calculation assumes the usual logrank null model and independent event contributions conditional on the risk sets; it is a null variance, not an estimate of a treatment effect.

$$ E_T=\sum_j \frac{n_{Tj}}{n_j}, \qquad V=\sum_j \frac{n_{Tj}n_{Cj}}{n_j^2}, \qquad U=O_T-E_T $$

When \(V>0\), the standardized statistic is \(Z=U/\sqrt{V}\). Under the null hypothesis, its distribution is approximately standard normal when the accumulated information is sufficient for the normal approximation. A positive \(Z\) means more treatment-group events than expected under the null, which points toward worse event experience in the treatment group. A negative \(Z\) means fewer treatment-group events than expected, which points toward better event experience. The direction is about event occurrence; in a survival setting, more events generally correspond to shorter survival.

For a two-sided test, the approximate p-value is \(2\{1-\Phi(|Z|)\}\), where \(\Phi\) is the standard normal cumulative distribution function. This is an approximate null probability of a statistic at least as far from zero as the observed statistic, not the probability that the null hypothesis is true. In a sequential trial it is also not automatically a boundary-adjusted p-value.

Worked Example: A Nearly Balanced Result at One Look

Suppose a hypothetical trial has four untied events before an interim cutoff. The risk sets immediately before those events are \((n_{Tj},n_{Cj})=(12,12),(11,12),(11,11),(11,10)\). The event groups, in order, are treatment, control, treatment, control. Assume group membership is correctly recorded and each listed risk set reflects the participants still under observation and event-free immediately before its event.

There are two observed treatment events, so \(O_T=2\). The expected treatment-event count is calculated from the risk sets, not from the overall randomized group sizes:

$$ E_T=\frac{12}{24}+\frac{11}{23}+\frac{11}{22}+\frac{11}{21} =0.5+0.4782609+0.5+0.5238095 =2.0020704 $$

Therefore \(U=2-2.0020704=-0.0020704\). The variance contributions are \(12(12)/24^2\), \(11(12)/23^2\), \(11(11)/22^2\), and \(11(10)/21^2\). Adding the unrounded contributions gives:

$$ V=0.25+\frac{132}{529}+0.25+\frac{110}{441} =0.9989605,\qquad \sqrt{V}\approx0.999480 $$

Thus \(Z=-0.0020704/0.999480\approx-0.0021\). The two-sided approximate p-value is about \(0.9983\). At this look, the observed treatment-event count is almost exactly its null expectation. This result alone is not evidence that the groups are equivalent, and it does not determine whether a monitoring boundary has been crossed.

A Second Calculation: Unequal Risk Sets

The risk-set method remains the same when the groups have different sizes at risk. The following hypothetical risk sets include changes between event times due to staggered enrollment and participants leaving the risk set without an event. The event allocations are consistent with the stated event counts, and each event is untied.

Worked Example: More Treatment Events Than Expected

At four event times, suppose the treatment and control risk-set sizes are \((20,10),(19,10),(19,9),(19,8)\). The event groups are control, treatment, control, treatment, so \(O_T=2\). The expected count, calculated from the exact fractions, is:

$$ E_T=\frac{20}{30}+\frac{19}{29}+\frac{19}{28}+\frac{19}{27} =2.7041142 $$

The treatment group had \(2\) events, fewer than the null expected count, so \(U=2-2.7041142=-0.7041142\). The variance is:

$$ V=\frac{20}{30}\frac{10}{30} +\frac{19}{29}\frac{10}{29} +\frac{19}{28}\frac{9}{28} +\frac{19}{27}\frac{8}{27} =0.8747608 $$

Using the unrounded values, \(\sqrt{V}\approx0.935286\), and \(Z=-0.7041142/0.935286\approx-0.7528\). The two-sided approximate normal p-value is about \(0.4516\). The negative sign indicates fewer treatment events than expected under the null, but the statistic is not far from zero in standard-error units.

It would be inaccurate to add rounded row contributions and then treat that sum as exact. For example, the exact expected count is approximately \(2.7041142\), which rounds to \(2.7041\); adding the displayed rounded fractions can shift the final digit. The same issue affects the variance and standardized statistic. Keep full precision through the additions and division, then round the reported results.

How the Score Builds Across Events

Each event contributes \(x_j-E_{Tj}\) to the score. A treatment event contributes \(1-n_{Tj}/n_j\), while a control event contributes \(-n_{Tj}/n_j\). The cumulative score adds those signed deviations. This provides a useful check: after all events, the sum of the event-by-event deviations must equal \(O_T-E_T\). The variance accumulates alongside that score, with each event’s contribution determined by the treatment and control counts at risk at that event.

Worked Example: Checking Event-by-Event Contributions

Consider a hypothetical trial with three untied events and risk sets \((8,8),(7,8),(7,7)\). Suppose the event groups are treatment, control, and treatment. These risk sets are consistent with the event sequence: the first treatment event reduces the treatment count from 8 to 7, and the second control event reduces the control count from 8 to 7.

The observed treatment count is \(O_T=2\), while:

$$ E_T=\frac{8}{16}+\frac{7}{15}+\frac{7}{14} =0.5+0.4666667+0.5 =1.4666667 $$

Hence \(U=2-1.4666667=0.5333333\). The event-level score contributions are \(1-8/16=0.5\), \(0-7/15=-0.4666667\), and \(1-7/14=0.5\); their sum is \(0.5333333\), as required. The variance is:

$$ V=\frac{8}{16}\frac{8}{16} +\frac{7}{15}\frac{8}{15} +\frac{7}{14}\frac{7}{14} =0.25+0.2488889+0.25 =0.7488889 $$

Thus \(\sqrt{V}\approx0.865383\) and \(Z=0.5333333/0.865383\approx0.6163\). The two-sided approximate p-value is about \(0.5377\). The positive score indicates more treatment events than expected, but the standardized result is modest.

Assumptions, Diagnostics, and Alternatives

The calculation is straightforward, but its interpretation depends on the data and design. For the examples above, assume participants are assigned to one of the two groups, the event and censoring records are accurate, and risk sets correctly include only participants still event-free and observed immediately before each event. Under the null, the groups have the same event experience, and censoring is non-informative for the event process within the assumptions of the trial analysis. The examples also assume untied events. If multiple events occur at the same recorded time, a tie-handling convention is required; the simple single-event variance formula used here is not a substitute for that calculation.

Before interpreting a result, check the following:

  • Risk-set integrity. Each event must be counted once, and the risk-set sizes must agree with the participant follow-up records. Unexpected increases or decreases should be explainable by enrollment, censoring, or data corrections.
  • Event and group coding. Confirm that \(x_j=1\) denotes a treatment event throughout. Reversing the group coding reverses the sign of \(U\) and \(Z\).
  • Arithmetic precision. Sum unrounded expected counts and variance contributions. Round only the final reported values.
  • Information and approximation. With very few events or a variance near zero, the normal approximation can be poor or the statistic can be undefined. A large absolute value of \(Z\) is not meaningful if the event data or risk sets are unreliable.
  • Time pattern of effects. If treatment effects differ over time, positive and negative score contributions can cancel. A small cumulative statistic need not mean that the groups’ survival patterns are similar at every time.

The logrank statistic is a natural unweighted comparison of event experience across risk sets. A weighted logrank procedure changes the relative influence of events over time and may be considered for a prespecified alternative pattern, but it is a different statistic and needs its own variance and calibration. A Cox-model analysis can estimate a hazard ratio and may provide a related test under its model assumptions; it answers a more explicitly model-based question. Comparing crude event proportions ignores when participants entered and left risk sets, so it is not a replacement for the logrank calculation when follow-up differs.

At a single interim look, report the observed count, expected count, score, variance, standardized statistic, and the direction of the comparison. Also identify whether the p-value is a simple one-look normal approximation or part of a sequentially calibrated procedure. Repeatedly comparing ordinary one-look p-values with the same nominal threshold does not, in general, preserve the intended overall type I error rate.

Key takeaway: At one look, calculate the treatment-group expected events and variance from the risk set immediately before each untied event. Then form \(U=O_T-E_T\) and \(Z=U/\sqrt{V}\), retaining full precision until the final rounding. The sign indicates the direction of the observed-minus-expected difference; sequential decision-making requires the trial’s calibrated monitoring rule.

Check Your Understanding

Try each problem, then compare your reasoning with the solutions.

  1. At an untied event, 6 treatment and 4 control participants are at risk. What is the expected treatment-event contribution and its variance contribution?
  2. Across a look, \(O_T=5\), \(E_T=4.2\), and \(V=3.0\). Calculate \(U\) and \(Z\), and state the direction indicated by the sign.
  3. Why should the expected counts and variance contributions be added before rounding?
  4. Does a one-look two-sided normal p-value automatically account for repeated interim testing? Explain.

Solutions. (1) The expected treatment-event contribution is \(6/(6+4)=0.6\); its variance contribution is \((6/10)(4/10)=0.24\). (2) \(U=5-4.2=0.8\) and \(Z=0.8/\sqrt{3}\approx0.462\). The positive sign indicates more treatment events than expected under the null. (3) Rounding intermediate terms can alter the total and therefore the standard error, standardized statistic, and p-value; use unrounded values until the final result. (4) No. Repeated interim testing requires a prespecified sequentially calibrated decision rule to control the overall type I error rate.

Clinical Biostats