11.4 Comparing survival: the log-rank test
To compare survival between two groups, form at each distinct event time \(t_j\) the \(2 \times 2\) table of group by event (yes or no) among those at risk. With \(n_{Aj}\) and \(n_{Bj}\) at risk, \(d_j\) events in total and \(d_{Aj}\) in group A, under the null hypothesis of equal hazards the conditional distribution of \(d_{Aj}\) given the margins is hypergeometric (Theorem 4.4.2), with \[ E_j = d_j\,\frac {n_{Aj}}{n_j}, \qquad V_j = \frac {n_{Aj}n_{Bj}d_j(n_j - d_j)}{n_j^2(n_j - 1)} . \]
Definition 11.4.1. The log-rank statistic is \[ X^2_{\text {LR}} = \frac {\bigl (\sum _j d_{Aj} - \sum _j E_j\bigr )^2}{\sum _j V_j} , \] approximately \(\chi ^2_1\) under the null hypothesis.
The log-rank test is the Mantel–Haenszel test (Theorem 10.3.1) with the risk sets at the event times as strata. The tables are not independent, since the same people appear in many risk sets, but the successive differences \(d_{Aj} - E_j\) are uncorrelated given the past (they form a martingale), which is enough for the same normal approximation. The test is most powerful when the hazard ratio is constant over time, the proportional hazards situation.
Example 11.4.2. Ten patients on the standard treatment (B) have times \(2\), \(3\), \(4\), \(5^+\), \(6\), \(8\), \(10\), \(11^+\), \(14\), \(16\). Combining with Example 11.3.2, there are \(12\) distinct event times from \(2\) to \(18\) months. Group A had \(O_A = 5\) deaths against \(E_A = 8.30\) expected, with \(\sum V_j = 2.73\), so \(X^2_{\text {LR}} = (5 - 8.30)^2/2.73 = 3.99\), \(P = 0.046\). Group B had \(8\) deaths against \(13 - 8.30 = 4.70\) expected. The ratio \((O_A/E_A)/(O_B/E_B) = 0.602/1.702 = 0.35\) is a rough estimate of the hazard ratio. With so few patients the evidence that A is better is modest.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.