Harman Patil (Editor)

Log rank test

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In statistics, the 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, named after Nathan Mantel and David Cox. The log-rank test can also be viewed as a time-stratified Cochran–Mantel–Haenszel test.

Contents

The test was first proposed by Nathan Mantel and was named the log-rank test by Richard and Julian Peto.

Definition

The log-rank 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.

Let j = 1, ..., J be the distinct times of observed events in either group. For each time j , let N 1 j and N 2 j be the number of subjects "at risk" (have not yet had an event or been censored) at the start of period j in the two groups (often treatment vs. control), respectively. Let N j = N 1 j + N 2 j . Let O 1 j and O 2 j be the observed number of events in the groups respectively at time j , and define O j = O 1 j + O 2 j .

Given that O j events happened across both groups at time j , under the null hypothesis (of the two groups having identical survival and hazard functions) O 1 j has the hypergeometric distribution with parameters N j , N 1 j , and O j . This distribution has expected value E 1 j = O j N j N 1 j and variance V j = O j ( N 1 j / N j ) ( 1 N 1 j / N j ) ( N j O j ) N j 1 .

The log-rank statistic compares each O 1 j to its expectation E 1 j under the null hypothesis and is defined as

Z = j = 1 J ( O 1 j E 1 j ) j = 1 J V j .

Asymptotic distribution

If the two groups have the same survival function, the log-rank statistic is approximately standard normal. A one-sided level α test will reject the null hypothesis if Z > z α where z α is the upper α 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 n d 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 log-rank statistic is approximately normal with mean ( log λ ) n d 4 and variance 1. For a one-sided level α test with power 1 β , the sample size required is n = 4 ( z α + z β ) 2 d log 2 λ where z α and z β are the quantiles of the standard normal distribution.

Joint distribution

Suppose Z 1 and Z 2 are the log-rank 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 λ and d 1 and d 2 are the probabilities that a subject will have an event at the two time points where d 1 d 2 . Z 1 and Z 2 are approximately bivariate normal with means log λ n d 1 4 and log λ n d 2 4 and correlation 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 log-rank test has been shown to be too permissive a test, allowing significant results for survivorship prediction models that have low accuracy. The F* test was developed in response to these observations and has been shown to be more critical and to track accuracy of the prediction models with higher fidelity.
  • The log-rank 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 log-rank 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 log-rank statistic, D is the number of events observed, and λ ^ is the estimate of the hazard ratio, then log λ ^ Z 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 log-rank 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 log-rank statistic gives all calculations the same weight, regardless of the time at which an event occurs. The Peto log-rank test statistic gives more weight to earlier events when there are a large number of observations.
  • References

    Log-rank test Wikipedia