5

I have learnt that the baseline hazard function in the Cox PH Model is unspecified. Does it mean that I can specify it as any functions and select the best one during experiments?

I also see that the CoxPHFitter function in the lifelines does not have any parameters where I can specific my baseline hazard function. So how does Lifelines calculate it?

Cam.Davidson.Pilon
  • 11,476
  • 5
  • 47
  • 75
Munichong
  • 1,645
  • 3
  • 15
  • 26

1 Answers1

7

I'm the author of lifelines and can help you.

Does it mean that I can specify it as any functions and select the best one during experiments?

Not normally, no. (In fact, if you could, that would make the Cox model fully parametric, and not semi parametric). It being "unspecified" means it is non-parametric. If you strongly have a prior assumption on what the baseline might be, there are other models (like AFT models) that could be used.

To answer your second question, how lifelines calculates the baseline survival, we use the formula on page 15 here. In code, this is represented here.

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