1

I would like to understand how term-specific p-values are calculated in the lifelines package ('p' in the summary table below).

The documentation says they are calculated using stats.chi2.sf(U, 1), but I don't understand how exactly this works. Is this a likelihood-ratio chi-squared test?

<lifelines.CoxPHFitter: fitted with 7350 observations, 5998 censored>
      duration col = T
         event col = label
number of subjects = 7350
  number of events = 1352
    log-likelihood = -10948.762
  time fit was run = 2018-12-17 10:48:35 UTC

---
         coef  exp(coef)  se(coef)        z      p  lower 0.95  upper 0.95     
AGE   -0.0001     0.9999    0.0000 -10.6696 0.0000     -0.0001     -0.0001  ***
GRADE -1.0068     0.3654    0.0450 -22.3973 0.0000     -1.0949     -0.9187  ***
---
Signif. codes: 0 '***' 0.0001 '**' 0.001 '*' 0.01 '.' 0.05 ' ' 1

Concordance = 0.797
Likelihood ratio test = 1297.307 on 2 df, p=0.00000


Code Source = How to interpret CoxPH survival regression

vimegace
  • 13
  • 3
  • It's the Wald test of a single parameter. `(estimate - null)^2 / var(estimate)` is asyp. a Chi2 distribution with 1 dof – Cam.Davidson.Pilon Oct 07 '21 at 02:28
  • Thank you, @Cam.Davidson.Pilon! – vimegace Oct 07 '21 at 13:42
  • That's not just the case for survival models. That's usual practice for all regression models fit by maximum likelihood (or partial likelihood, for Cox models). See [this page](https://stats.idre.ucla.edu/other/mult-pkg/faq/general/faqhow-are-the-likelihood-ratio-wald-and-lagrange-multiplier-score-tests-different-andor-similar/) for how Wald, likelihood-ratio, and score tests are related. It is possible to do likelihood-ratio tests on individual coefficients (I think SAS provides that functionality), but it's more computationally involved. – EdM Oct 07 '21 at 14:50

1 Answers1

2

It's the Wald test of a single parameter: (estimate - null)^2 / var(estimate) is asymptotically a Chi2 distribution with 1 d.o.f.

Source: Survival Analysis by John P. Klein and Melvin L. Moeschberger, Second Edition, page 256

Cam.Davidson.Pilon
  • 11,476
  • 5
  • 47
  • 75