Logrank test explained

The logrank test, or log-rank test, is a hypothesis test to compare the survival distributions of two samples. It is a nonparametric test and appropriate to use when the data are right skewed and censored (technically, the censoring must be non-informative). It is widely used in clinical trials to establish the efficacy of a new treatment in comparison with a control treatment when the measurement is the time to event (such as the time from initial treatment to a heart attack). The test is sometimes called the Mantel–Cox test. The logrank test can also be viewed as a time-stratified Cochran–Mantel–Haenszel test.

The test was first proposed by Nathan Mantel and was named the logrank test by Richard and Julian Peto.[1] [2] [3]

Definition

The logrank test statistic compares estimates of the hazard functions of the two groups at each observed event time. It is constructed by computing the observed and expected number of events in one of the groups at each observed event time and then adding these to obtain an overall summary across all-time points where there is an event.

Consider two groups of patients, e.g., treatment vs. control. Let

1,\ldots,J

be the distinct times of observed events in either group. Let

N1,j

and

N2,j

be the number of subjects "at risk" (who have not yet had an event or been censored) at the start of period

j

in the groups, respectively. Let

O1,j

and

O2,j

be the observed number of events in the groups at time

j

. Finally, define

Nj=N1,j+N2,j

and

Oj=O1,j+O2,j

.

The null hypothesis is that the two groups have identical hazard functions,

H0:h1(t)=h2(t)

. Hence, under

H0

, for each group

i=1,2

,

Oi,j

follows a hypergeometric distribution with parameters

Nj

,

Ni,j

,

Oj

. This distribution has expected value

Ei,j=Oj

Ni,j
Nj
and variance

Vi,j=Ei,j\left(

Nj-Oj
Nj

\right)\left(

Nj-Ni,j
Nj-1

\right)

.

For all

j=1,\ldots,J

, the logrank statistic compares

Oi,j

to its expectation

Ei,j

under

H0

. It is defined as

Zi=

J
\sum(Oi,j-Ei,j)
j=1
\sqrt
J
{\sum
j=1
Vi,j
}\ \xrightarrow\ \mathcal N(0,1)      (for

i=1

or

2

)

By the central limit theorem, the distribution of each

Zi

converges to that of a standard normal distribution as

J

approaches infinity and therefore can be approximated by the standard normal distribution for a sufficiently large

J

. An improved approximation can be obtained by equating this quantity to Pearson type I or II (beta) distributions with matching first four moments, as described in Appendix B of the Peto and Peto paper.

Asymptotic distribution

If the two groups have the same survival function, the logrank statistic is approximately standard normal. A one-sided level

\alpha

test will reject the null hypothesis if

Z>z\alpha

where

z\alpha

is the upper

\alpha

quantile of the standard normal distribution. If the hazard ratio is

λ

, there are

n

total subjects,

d

is the probability a subject in either group will eventually have an event (so that

nd

is the expected number of events at the time of the analysis), and the proportion of subjects randomized to each group is 50%, then the logrank statistic is approximately normal with mean

(log{λ})\sqrt{

nd
4
} and variance 1.[4] For a one-sided level

\alpha

test with power

1-\beta

, the sample size required is

n=

4(z\alpha+
2
z
\beta)
dlog2{λ
}where

z\alpha

and

z\beta

are the quantiles of the standard normal distribution.

Joint distribution

Suppose

Z1

and

Z2

are the logrank statistics at two different time points in the same study (

Z1

earlier). Again, assume the hazard functions in the two groups are proportional with hazard ratio

λ

and

d1

and

d2

are the probabilities that a subject will have an event at the two time points where

d1\leqd2

.

Z1

and

Z2

are approximately bivariate normal with means

log{λ}\sqrt{

nd1
4
} and

log{λ}\sqrt{

nd2
4
} and correlation

\sqrt{

d1
d2
} . Calculations involving the joint distribution are needed to correctly maintain the error rate when the data are examined multiple times within a study by a Data Monitoring Committee.

Relationship to other statistics

Z

is the logrank statistic,

D

is the number of events observed, and

\hat{λ}

is the estimate of the hazard ratio, then

log{\hat{λ}}Z\sqrt{4/D}

. This relationship is useful when two of the quantities are known (e.g. from a published article), but the third one is needed.

Test assumptions

The logrank test is based on the same assumptions as the Kaplan-Meier survival curve—namely, that censoring is unrelated to prognosis, the survival probabilities are the same for subjects recruited early and late in the study, and the events happened at the times specified. Deviations from these assumptions matter most if they are satisfied differently in the groups being compared, for example if censoring is more likely in one group than another.[5]

See also

Notes and References

  1. Mantel, Nathan . Nathan Mantel . 1966 . Evaluation of survival data and two new rank order statistics arising in its consideration. . Cancer Chemotherapy Reports . 50 . 3 . 163–70 . 5910392.
  2. Peto, Richard . Richard Peto . Peto, Julian . 1972 . Asymptotically Efficient Rank Invariant Test Procedures . Journal of the Royal Statistical Society, Series A . 135 . 2 . 185–207 . 10.2307/2344317 . 2344317 . Blackwell Publishing. 10338.dmlcz/103602 . free .
  3. Book: Harrington, David . Encyclopedia of Biostatistics . Linear Rank Tests in Survival Analysis. 10.1002/0470011815.b2a11047 . 2005. Wiley Interscience. 047084907X.
  4. Schoenfeld . D . 1981 . The asymptotic properties of nonparametric tests for comparing survival distributions . Biometrika . 68 . 1 . 316–319 . 2335833 . 10.1093/biomet/68.1.316.
  5. 2004 . 1073 . 15117797 . 403858 . 10.1136/bmj.328.7447.1073 . 7447 . 328 . Altman . J. M. . D. G. . Martin Bland. The logrank test . BMJ . Bland. Doug Altman.