My question is as the title emplies, can I use cox model to measure the difference (or similarity) of two survival functions, just as log-rank test does?

And if so, how?

Thanks in advance!

  • $\begingroup$ @EdM Thanks for your comment, could I ask you to please explain further how exacly the two approaches provide the same answer. I just recently learned about the two $\endgroup$ May 4, 2022 at 16:44
  • 1
    $\begingroup$ That comes from the technical details of how you calculate the "score" for a Cox regression. The "score test" is only 1 of 3 tests routinely used to evaluate Cox models, so it's dangerous to say that a Cox model provides "the same answer" as the log-rank test even in the 2-group situation. That's only true if you use the score test. See this Wikipedia entry on the score test and this entry on the log-rank test. There can also be discrepancies depending on how tied survival times are handled. $\endgroup$
    – EdM
    May 4, 2022 at 17:41
  • $\begingroup$ @EdM So if I understood correctly, the test_statistic output of the log-rank test is the score test value of how much the two survival function are the same? and then In order to measure the similarity as well in the same two survival functions with Cox model, i need to look on the parameters that the Cox model assigns to each survival function (in his attempt to perform parameters approximation) and if the same parameters were assigned, then i look at the p-value and assess if the two survival functions are the same? $\endgroup$ May 5, 2022 at 15:35
  • $\begingroup$ The log-rank and Cox score-test equivalence is for the case of 2 groups. In that case, the Cox model will only estimate a single parameter (regression coefficient/hazard ratio) distinguishing survival of the 2 groups, while assuming the same shape of a baseline hazard function for both groups. The p-value estimates for individual Cox regression coefficients are typically based on Wald tests, not on score tests. Those tests can differ with small sample sizes. Standard output from Cox modeling software typically reports the score test only for the model as a whole. $\endgroup$
    – EdM
    May 5, 2022 at 19:10
  • $\begingroup$ Thx! now I understand! $\endgroup$ May 7, 2022 at 16:52


Browse other questions tagged or ask your own question.