logrank test

{{Short description|Hypothesis test to compare the survival distributions of two samples}}

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.{{cite journal

| author = Mantel, Nathan |author-link=Nathan Mantel

| year = 1966

| title = Evaluation of survival data and two new rank order statistics arising in its consideration.

| journal = Cancer Chemotherapy Reports

| volume = 50

| issue = 3

| pages = 163–70

| pmid = 5910392

}}{{cite journal

| author = Peto, Richard | author-link=Richard Peto

|author2=Peto, Julian

| year = 1972

| title = Asymptotically Efficient Rank Invariant Test Procedures

| journal = Journal of the Royal Statistical Society, Series A

| volume = 135

| issue = 2

| pages = 185–207

| doi = 10.2307/2344317

| jstor = 2344317

| publisher = Blackwell Publishing

| hdl=10338.dmlcz/103602

| hdl-access = free

}}

{{Cite book| title=Encyclopedia of Biostatistics | chapter=Linear Rank Tests in Survival Analysis

| first=David |last=Harrington|doi=10.1002/0470011815.b2a11047 |year=2005| publisher=Wiley Interscience| isbn=047084907X

}}

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 N_{1,j} and N_{2,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 O_{1,j} and O_{2,j} be the observed number of events in the groups at time j. Finally, define N_j = N_{1,j} + N_{2,j} and O_j = O_{1,j} + O_{2,j}.

The null hypothesis is that the two groups have identical hazard functions, H_0 : h_1(t) = h_2(t). Hence, under H_0, for each group i = 1, 2, O_{i,j} follows a hypergeometric distribution with parameters N_j, N_{i,j}, O_j. This distribution has expected value E_{i,j} = O_j \frac{N_{i,j}}{N_j} and variance V_{i,j} = E_{i,j} \left( \frac{N_j - O_j}{N_j} \right) \left( \frac{N_j - N_{i,j}}{N_j - 1} \right).

For all j = 1, \ldots, J, the logrank statistic compares O_{i,j} to its expectation E_{i,j} under H_0. It is defined as

:Z_i = \frac {\sum_{j=1}^J (O_{i,j} - E_{i,j})} {\sqrt {\sum_{j=1}^J V_{i,j}}}\ \xrightarrow{d}\ \mathcal N(0,1)      (for i=1 or 2)

It is easy to see that for all j, O_{2,j} - E_{2,j} = -(O_{1,j} - E_{1,j}) and V_{2,j} = V_{1,j},

so Z_2 = -Z_1.

By the central limit theorem, the distribution of each Z_i 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 \lambda, 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{\lambda}) \, \sqrt {\frac {n \, d} {4}} and variance 1.{{cite journal | last=Schoenfeld | first=D | year=1981 | title=The asymptotic properties of nonparametric tests for comparing survival distributions | journal=Biometrika | volume=68 | issue=1 | pages=316–319 | jstor=2335833 | doi=10.1093/biomet/68.1.316}} For a one-sided level \alpha test with power 1-\beta, the sample size required is

n = \frac {4 \, (z_\alpha + z_\beta)^2 } {d\log^2{\lambda}}

where z_\alpha and z_\beta are the quantiles of the standard normal distribution.

Joint distribution

Suppose Z_1 and Z_2 are the logrank statistics at two different time points in the same study ( Z_1 earlier). Again, assume the hazard functions in the two groups are proportional with hazard ratio \lambda and d_1 and d_2 are the probabilities that a subject will have an event at the two time points where d_1 \leq d_2 . Z_1 and Z_2 are approximately bivariate normal with means \log{\lambda} \, \sqrt {\frac {n \, d_1} {4}} and \log{\lambda} \, \sqrt {\frac {n \, d_2} {4}} and correlation \sqrt {\frac {d_1} {d_2}} . 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

  • The logrank statistic can be derived as the score test for the Cox proportional hazards model comparing two groups. It is therefore asymptotically equivalent to the likelihood ratio test statistic based from that model.
  • The logrank statistic is asymptotically equivalent to the likelihood ratio test statistic for any family of distributions with proportional hazard alternative. For example, if the data from the two samples have exponential distributions.
  • If Z is the logrank statistic, D is the number of events observed, and \hat {\lambda} is the estimate of the hazard ratio, then \log{\hat {\lambda}} \approx 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.
  • The logrank statistic can be used when observations are censored. If censored observations are not present in the data then the Wilcoxon rank sum test is appropriate.
  • The logrank statistic gives all calculations the same weight, regardless of the time at which an event occurs. The Peto logrank test statistic gives more weight to earlier events when there are a large number of observations.

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.{{Cite journal | year = 2004 | pages = 1073 | pmid = 15117797 | pmc = 403858 | doi = 10.1136/bmj.328.7447.1073 | issue = 7447 | volume = 328 | last2 = Altman | first1 = J. M. | first2 = D. G. | author-link1=Martin Bland| title = The logrank test | journal = BMJ | last1 = Bland| author-link2=Doug Altman}}

See also

{{Portal|Mathematics}}

References

{{Reflist}}

{{Statistics|analysis}}

{{DEFAULTSORT:Logrank Test}}

Category:Survival analysis

Category:Time series statistical tests