Tutorials › Group Sequential Methods and Sample Size Re-Estimation › Updating Risk Sets At Data Cutoffs

Group Sequential Logrank Tests · Tutorial 506 of 699

Updating Risk Sets At Data Cutoffs

Learn to reconstruct risk sets at an interim data cutoff and verify the event counts, logrank score, and variance calculated from them.

Advanced 12 min read

What You'll Learn

  • Define who is at risk immediately before each event time, including under delayed entry.
  • Apply a stated convention for entry, event, censoring, and cutoff times that coincide.
  • Recalculate treatment-specific risk-set counts from individual records.
  • Check logrank expected counts, score contributions, and tied-event variance.
  • Diagnose how incorrect handling of entry or censoring changes a logrank calculation.

Why Risk Sets Must Be Rebuilt at a Cutoff

A logrank calculation depends on who could have experienced each event at the time it occurred. That group is the risk set. At an interim analysis, it is not enough to count everyone enrolled by the cutoff: participants may have entered later, experienced an event earlier, or been censored before a particular event time. Rebuilding risk sets from individual records is therefore a direct way to check whether an interim logrank score and its variance use the right data.

The task here is to reconstruct the risk sets and check the resulting logrank calculation, not to choose a monitoring boundary. Assume a two-arm randomized trial with treatment and control, exact follow-up times, right-censoring, and a prespecified data cutoff \(\tau\). Unless stated otherwise, use one unstratified logrank calculation. Participants enter observation at their recorded entry times, and censoring is noninformative for the event process within treatment group. The usual null calculation also treats treatment labels as exchangeable among participants in each risk set under \(H_0\). With delayed entry, inclusion must reflect when a participant actually became observable; participants are not placed in risk sets for times before they entered.

Definition: The risk set immediately before time \(t\), denoted here by \(R(t)\), contains participants who have entered observation by \(t\) and whose event or censoring time is at least \(t\). Let \(Y_1(t)\) and \(Y_0(t)\) be its treatment and control counts, and let \(Y(t)=Y_1(t)+Y_0(t)\). A participant who has an event at \(t\) is in the risk set for that event. A participant censored before \(t\) is not.

This definition requires a convention for records with equal times. In the examples, entry at time \(t\) means entry is known to have occurred before events at \(t\), and a censoring time of \(t\) means the participant is considered at risk immediately before events at \(t\). Thus, if events and censoring share a recorded time, events are counted before removals by censoring. Events at the cutoff itself are included if observed by the cutoff. Real data systems must use a consistent, documented convention; if recorded times do not establish the order, the analysis rule must resolve the ambiguity.

From Risk Sets to Logrank Contributions

At a distinct event time \(t_j\), let \(d_j\) be the total number of events in both arms, and let \(O_{1j}\) be the number of those events in treatment. Under the null of equal event hazards, conditional on \(d_j\) events among the \(Y_j\) people at risk, the expected number of treatment events is \(d_jY_{1j}/Y_j\). The event-time score contribution is observed minus expected treatment events. For tied events, the standard conditional variance accounts for drawing \(d_j\) event labels without replacement from the risk set.

$$ E_{1j}=d_j\frac{Y_{1j}}{Y_j},\qquad U_j=O_{1j}-E_{1j},\qquad V_j=d_j\frac{Y_{1j}Y_{0j}}{Y_j^2}\frac{Y_j-d_j}{Y_j-1}. $$

The tied-event variance formula applies when \(Y_j>1\); if \(d_j=Y_j\), its finite-population correction is zero, as it should be because all people at risk have an event. For a single event, \(d_j=1\), the correction is one, so \(V_j=Y_{1j}Y_{0j}/Y_j^2\). Sum contributions over event times observed by the cutoff: \(U(\tau)=\sum_j U_j\) and \(V(\tau)=\sum_j V_j\). The conventional standardized logrank statistic is \(Z(\tau)=U(\tau)/\sqrt{V(\tau)}\), when \(V(\tau)>0\).

The expected-count formula follows from the conditional null allocation of events. If \(d_j\) event labels are selected from \(Y_j\) people, of whom \(Y_{1j}\) are treated, the expected treatment count is \(d_j\) times the treatment fraction \(Y_{1j}/Y_j\). For one event, the treatment-event indicator has variance \(p(1-p)\), with \(p=Y_{1j}/Y_j\), giving \(Y_{1j}Y_{0j}/Y_j^2\). For \(d_j\) tied events, sampling without replacement multiplies the corresponding binomial variance by \((Y_j-d_j)/(Y_j-1)\). This explains why risk-set counts determine both the score and its variance.

1
Fix the cutoff and time convention.
Include event records observed by \(\tau\), and specify how entry or censoring at an event time is ordered.
2
List distinct event times.
Include times with events by the cutoff; censoring times alone do not create logrank score contributions.
3
Recount the risk set at each event time.
Include each participant who has entered and has not had an event or been censored before that time.
4
Calculate and sum contributions.
Use the risk-set counts and observed treatment events to calculate \(U_j\) and \(V_j\), then add them across event times.

Worked Reconstruction at an Interim Cutoff

Worked Example: Rebuilding Risk Sets Through Time 7

Hypothetical data. Consider these eight participants at an interim cutoff \(\tau=7\). “Event” means an observed event time; “censor” is the last observed time without an event. Participant H is administratively censored at the cutoff.

ParticipantArmEntry timeRecord by cutoff
ATreatment0Event at 2
BTreatment0Event at 4
CTreatment3Censored at 6
DTreatment5Event at 7
EControl0Event at 3
FControl1Event at 4
GControl2Censored at 5
HControl4Administratively censored at 7

At time 2, A and B are the treatment participants at risk; E, F, and G are the controls at risk. C and H have not entered. Thus \(Y_1=2\), \(Y_0=3\), \(Y=5\), \(d=1\), and \(O_1=1\). The score is \(1-2/5=0.600\), and the variance is \(2\cdot3/5^2=0.240\).

At time 3, B and C are at risk in treatment; E, F, and G are at risk in control. A has already had an event. The control event E gives \(Y_1=2\), \(Y_0=3\), \(Y=5\), \(d=1\), and \(O_1=0\). Therefore \(U_j=0-2/5=-0.400\) and \(V_j=2\cdot3/5^2=0.240\).

At time 4, B and C are at risk in treatment. F and G are at risk in control, and H has entered, giving three controls and five people total. B and F have tied events, so \(d=2\), \(O_1=1\), and the expected treatment count is \(2\cdot2/5=0.800\). The score is \(1-0.800=0.200\). The tied-event variance is \(2\cdot(2\cdot3/5^2)\cdot(5-2)/(5-1)=2\cdot0.240\cdot0.750=0.360\).

At time 7, C was censored at 6 and is no longer at risk; D entered at 5 and H remains under observation through the cutoff. Thus D and H are the risk set, with \(Y_1=Y_0=1\), \(Y=2\), and one treatment event. This gives \(U_j=1-1/2=0.500\) and \(V_j=1\cdot1/2^2=0.250\). Summing the four event times gives \(U(7)=0.600-0.400+0.200+0.500=0.900\) and \(V(7)=0.240+0.240+0.360+0.250=1.090\). Hence \(Z(7)=0.900/\sqrt{1.090}=0.862\), to three significant figures.

The calculation uses only events observed by time 7. In particular, the cutoff does not make H an event, and C’s censoring at 6 removes C from the risk set at time 7.

Cutoff Choices and Record Audits

Worked Example: Comparing Cutoffs 5 and 7

Use the hypothetical records above, but suppose the first cutoff is \(\tau=5\). The observed events by time 5 are at 2, 3, and 4. The risk sets at those event times are unchanged: the later entry of D and later events or censoring cannot alter who was at risk at earlier times. The cumulative score is \(0.600-0.400+0.200=0.400\), and the cumulative variance is \(0.240+0.240+0.360=0.840\). The statistic is \(0.400/\sqrt{0.840}=0.436\).

By cutoff 7, D’s event at 7 adds \(0.500\) to the score and \(0.250\) to the variance, producing \(U(7)=0.900\) and \(V(7)=1.090\). G’s censoring at 5 and C’s censoring at 6 do not themselves add event contributions. They matter because they determine membership in later risk sets. This is the basic audit distinction: censoring changes subsequent risk-set counts, whereas only event times contribute to the logrank score and variance.

Worked Example: Detecting an Incorrect Risk Set With Ties

Hypothetical data. A trial has treatment participants A (entry 0, event 2), B (entry 0, censor 4), and C (entry 3, event 6), and controls D (entry 0, event 3), E (entry 1, event 6), and F (entry 4, censor 6). Apply the event-before-censor convention at shared times.

At time 2, A, B, D, and E are at risk: \(Y_1=2\), \(Y_0=2\), \(Y=4\). A is the treatment event, so \(U_2=1-2/4=0.500\), and \(V_2=2\cdot2/4^2=0.250\).

At time 3, B and C are at risk in treatment, and D and E are at risk in control. D is still in the risk set immediately before the event at 3. Thus \(Y_1=2\), \(Y_0=2\), \(Y=4\), and the control event has expected treatment count \(2\cdot2/4=1\). Therefore \(U_3=0-1=-1\), and \(V_3=2\cdot2/4^2=0.250\).

At time 6, C, E, and F are at risk immediately before events and censoring at that time. There are \(Y_1=1\), \(Y_0=2\), \(Y=3\), and two tied events, one in each arm. Thus \(E_1=2/3\), \(U_6=1-2/3=0.333\), and \(V_6=2\cdot(1\cdot2/3^2)\cdot(3-2)/(3-1)=0.222\). The cumulative score is \(1/2-1+1/3=-1/6\), the variance is \(1/4+1/4+2/9=13/18\approx0.7222\), and \(Z=(-1/6)/\sqrt{13/18}\approx-0.1961\).

A calculation that excludes C at time 3 because C entered on that date, or excludes F from the time-6 risk set despite the stated censoring convention, will not reproduce these results. B must be excluded at time 6 because B was censored at 4. The record-level audit identifies exactly which time-ordering or removal rule caused a discrepancy.

Diagnostics, Alternatives, and Limitations

A reliable audit should make it possible to trace every event contribution back to participant records. Useful checks include:

  • At each event time, verify \(Y_j=Y_{1j}+Y_{0j}\), and confirm no participant enters before their entry record.
  • Check that an individual with an event or censoring strictly before \(t_j\) is absent at \(t_j\), while one censored exactly at \(t_j\) follows the stated tie convention.
  • Confirm \(0\leq E_{1j}\leq d_j\), and that \(U_j=O_{1j}-E_{1j}\) has the intended sign: more treatment events than expected gives a positive score.
  • For a single event, check the variance using \(Y_{1j}Y_{0j}/Y_j^2\). For tied events, include the finite-population correction; do not use the single-event expression unchanged.
  • Ensure the risk set is rebuilt at every event time. Reusing a count from the preceding time misses entries and removals.

The manual calculation here is an audit of the standard logrank score from individual event histories. A software implementation may use counting-process data, event-time tables, or stratified risk sets; these are computational approaches, not different rules about who is at risk. In a stratified analysis, risk sets and contributions are formed within strata before the stratum contributions are combined. A different time scale or a different rule for ties can also produce different results, so comparisons are meaningful only when the data handling and conventions match.

Risk-set reconstruction does not fix informative censoring, inaccurate event times, omitted entry records, or an incorrectly defined cutoff. If censoring depends on event risk in a way not handled by the analysis, the usual logrank interpretation may fail. Nor does a correctly reconstructed risk set establish that a proportional-hazards interpretation is appropriate. The audit verifies the calculation from the supplied records and assumptions; it cannot validate those assumptions by itself.

Common mistake: “Everyone enrolled by the interim cutoff belongs in every risk set up to that cutoff.” This is wrong: a participant belongs only after entry and only until an event or censoring removes them. Rebuild membership immediately before each event time, then calculate the event contribution from that time-specific risk set.

Check Your Understanding

Try each question, then compare your work with the solutions below.

  1. At an event time, 4 treatment and 6 control participants are at risk, and one control participant has an event. Find the expected treatment events, score contribution, and variance contribution.
  2. At time 5, a participant entered at time 2 and was censored at time 4. Should this participant be counted in the risk set at time 5? Explain.
  3. At a tied event time, \(Y_1=3\), \(Y_0=2\), and \(d=2\), with one treatment event. Calculate the expected treatment count, score, and variance.
  4. Under the event-before-censor convention, a participant’s censoring time equals the event time. Is the participant counted in the risk set for that event time? What changes if censoring occurred strictly earlier?

Solutions. (1) \(Y=10\), so the expected treatment events are \(1\cdot4/10=0.400\); the score is \(0-0.400=-0.400\), and the variance is \(4\cdot6/10^2=0.240\). (2) No. Censoring at 4 is before time 5, so the participant is no longer at risk. (3) \(Y=5\), \(E_1=2\cdot3/5=1.200\), and \(U=1-1.200=-0.200\). The variance is \(2\cdot(3\cdot2/5^2)\cdot(5-2)/(5-1)=2\cdot0.240\cdot0.750=0.360\). (4) Yes, under the stated convention the participant is at risk immediately before events at that same time. If censoring occurred strictly earlier, the participant would not be included.

Clinical Biostats