4
$\begingroup$

I have understood the logrank test as a "safe" or "conservative" way to check for a difference between two survival curves. It is "safe" in the sense that it is a nonparametric test of $h_1(t) = h_2(t)$, where $h_i( \cdot)$ is the hazard function of the $i^{th}$ group. I can't find sources that support this claim of "safety", so I've either invented this interpretation myself or observed it from others over the years.

I have seen sources that say that the logrank test statistic is equivalent to the score test (also called the Legrange multiplier test). I am pulling definitions from these course notes (pg. 14) for anyone who wants to look. The score of a Cox model is $$\sum_{i=1}^{n} \delta_{i}\left\{Z_{i}-E\left(Z ; T_{i}\right)\right\},$$ where $\delta_i$ is an indicator of whether the subject $i$ has an event, $T_i$ is the possibly-censored survival time, $Z_i$ is a covariate like treatment assignment, and $E\left(Z ; T_{i}\right)$ is the expectation of $Z_i$. This is equivalent (or analogous??) to the "Observed - Expected" form of the logrank test.

I have two related questions:

  1. Since the logrank test and Cox regression have this equivalence, is my perception incorrect that the logrank test is "safer" than Cox regression?
  2. A cox model assumes that the hazard functions are proportional with the same baseline hazard: $h(t | Z_i) = h_0(t) * \exp(Z_i \times \beta)$. I am not aware of any assumptions for the logrank test. My perception has always been that a logrank test statistics must be better than Cox regression in terms of power or asymptotic efficiency or something since it is not making an assumption of proportional hazards. Is this actually true?
$\endgroup$
3
  • 2
    $\begingroup$ A good discussion, but not a complete answer to your questions, here: discourse.datamethods.org/t/… $\endgroup$ Commented Sep 9, 2020 at 18:46
  • $\begingroup$ Could you please let me know where I can find the references for the presented notes? I've searched on books and articles but I haven't been able to find the sources for pages 26, 27 and 28. Thank you so in advance! $\endgroup$
    – Raquel
    Commented Aug 11, 2021 at 10:08
  • $\begingroup$ @Raquel course notes like these often don't include references. The content on pages 26-28 is based on standard log-partial-likelihood formulas for a Cox model, to be found starting on page 13 of those notes and in most survival-analysis texts, and its score test. What's missing is direct comparison to the equivalent form of the usual logrank test, in the notes for lecture 3 in this course. $\endgroup$
    – EdM
    Commented Aug 11, 2021 at 16:54

3 Answers 3

10
$\begingroup$

There is no advantage to using the log-rank statistic and several disadvantages:

  • Unlike the Cox model, log-rank does not generalize to a Bayesian framework
  • the log-rank test only works for mutually exclusive categories and does not handle a continuous exposure variable
  • log-rank does not allow for general covariate adjustment

Since the log-rank test is a special case of the Cox model, it does not have fewer assumptions or more power. IMHO we no longer need to be using or teaching the log-rank test.

$\endgroup$
6
  • 2
    $\begingroup$ Thank you. I was never concerned about those disadvantages, though a reminder is helpful. I thought of log-rank as a barebones Frequentist test when you only had a covariate for treatment assignment. I have been genuinely surprised to see it is equivalent to Cox regression. $\endgroup$
    – Eli
    Commented Sep 9, 2020 at 19:29
  • 1
    $\begingroup$ Two advantages of the log-rank statistic over traditional Cox PH: it can give you a p-value if one of the groups has zero events while Cox PH cannot (perfect separation = unbounded MLE's). Second, if a priori we believe the difference should be heaviest at a certain time, we can upweight that region of time for more power. $\endgroup$
    – Cliff AB
    Commented Jan 3 at 17:11
  • 2
    $\begingroup$ Beg to differ. Nothing is wrong with the likelihood ratio $\chi^2$ tests in the Cox model if there is perfect separation. And yes you can change weights if not using likelihood-based inference (which is quite a loss) but the estimand becomes impossible to describe. $\endgroup$ Commented Jan 4 at 7:45
  • $\begingroup$ Both our statements are correct: likelihood ratio test is statistical valid in the case of perfect separation...but numerical errors will occur, i.e. survival's coxph will throw a warning about failure to converge. You and I may be fine ignoring that warning, but biologists who did not publish a book on regression models may be more cautious ;) $\endgroup$
    – Cliff AB
    Commented Jan 5 at 3:17
  • 1
    $\begingroup$ I wrote about this in more detail at fharrell.com/post/logrank $\endgroup$ Commented Nov 26 at 14:14
2
$\begingroup$

The relation between the log-rank test and the Cox PH model is very similar to that of the two-sample t-test and linear regression. That is, for a standard log-rank test, it is roughly equivalent to fitting a Cox-PH model with an indicator for group. There is a corner case in which the standard log-rank has some advantage: if one of the groups events are earlier than all of the other (or all censored), this causes perfect separation of the data and can lead to unbounded MLE's, causing numeric issues.

But similar to the two sample t-test with unequal variances and linear regression, log rank statistics can be generalized in ways that are not so simple (or at least, not readily implemented) for regression models. In particular, the weighted log-rank statistic allows us to upweight parts of the survival curve where we suspect the hazard ratios to differ the most and thus regain power in the case of non-proportional hazards.

For some discussion, see "Is it time for the weighted log-rank test to play a more important role in confirmatory trials?" by Zheng Su (2018).

$\endgroup$
7
  • $\begingroup$ This is problematic. Please see my comment above. $\endgroup$ Commented Jan 4 at 7:45
  • $\begingroup$ A better approach which is powerful and much more interpretable is here. $\endgroup$ Commented Jan 4 at 7:58
  • $\begingroup$ You know better than to flatly say "more powerful". You mean "more powerful under certain conditions". Weighted log-rank statistics are all about getting closer to those conditions by using a priori information about where the hazards differ the most. In the case something like cancer treatments, the medical researchers are very likely to have a very good idea a priori about when the hazards between the groups should change the most based on their knowledge of cancer mechanisms. Weighted log-rank statistics is still a fairly active area of statistical research. $\endgroup$
    – Cliff AB
    Commented Jan 5 at 3:21
  • $\begingroup$ Weighted analyses are attempts at keeping the treatment comparison at one degree of freedom to preserve power. But when the analyst uses the data to select the weight, the type I assertion probability $\alpha$ is not preserved. The 2 d.f. accelerated test (Cox model with one time-dependent covariate that involves log(t)) has a perfect multiplicity adjustment and unlike weighted tests provide interpretable estimates. And weighted methods don't extend to handle things like multiple levels of clustering. $\endgroup$ Commented Jan 5 at 7:30
  • $\begingroup$ Yep, agreed that standard weight log rank is about getting back that df via prior knowledge. Fwiw, a recent review finds the Breslow test to be generally have less power than recent adaptive weighted log-rank tests, such as MaxCombo: arxiv.org/pdf/1909.09467.pdf $\endgroup$
    – Cliff AB
    Commented Jan 5 at 7:48
0
$\begingroup$

In the simple, semi-parametric Cox model

$$h(t | Z_i) = h_0(t) \exp(Z_i \times \beta)$$

where

$$ Z_i= \begin{cases} 0 & \text{if subject $i$ is in the 1st group}\\ 1 & \text{if subject $i$ is in the 2nd group} \end{cases} $$

the null hypothesis that $\beta = 0$ is just the hypothesis that the two groups have the (unspecified) hazard function $h_0$ in common. So any valid test of $\beta=0$ is a valid, non-parametric test of $h_1(t) = h_2$(t) (where $h_1(t)=h_0(t)$ & $h_2(t)=h_0(t)\exp(\beta)$).

It's rather an apples-and-oranges comparison to say the log-rank test is safer than Cox regression, but it is true that it doesn't rely on an assumption of proportional hazards for validity. As the score test for the Cox model, it's the locally most powerful test (the most sensitive to $\beta$s approaching zero); it has good power against alternatives with more-or-less proportional hazards, & fairly decent power against alternatives where the hazard for one group is consistently higher than that of the other over time.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.