wrong result with CoxPHFitter #1486
-
| Hello I'm beginner in lifelines, so hope you will be indulgent. As a beginner I start to test Cox model in lifelines on known dataset of two groups of leukemia patients: one group of 21 persons has received a certain treatment; the other group of 21 persons has received a placebo. The data come from Freireich et al., Blood, 1963. Results of Cox model for this dataset is fully observed in David G. Kleinbaum, Mitchel Klein auth. Survival Analysis A Self-Learning Text. In this book for single feature 'group' Cox coefficient is 1.509. But using lifelines I get coefficient 1.57 and I can't find reason for this. Besides, I solved the same problem in Matlab and in scikit-survival and got the same coefficient 1.509 as in book. Could you help me please to find my mistake in lifelines? | 
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
| Hi @takra, I downloaded your data and I got the same result in lifelines, 1.57. In R's  For inference in such a simple dataset (small data, no covariates), things should be almost identical. | 
Beta Was this translation helpful? Give feedback.
-
| My guess is that the other methods are not converging "enough". For example, in lifelines and in R, a partial-log-lik or -85.01 is achieved. In the screenshot, a partial-log-lik of -86.38 is achieved. We want to maximize this value, so I suspect that the other methods are halting convergence too early. I see the same situation happen in model 2: lifelines and R achieve a larger partial-log-lik, hence should be considered more accurate. Can you change the convergence parameters in the Matlab code? | 
Beta Was this translation helpful? Give feedback.

My guess is that the other methods are not converging "enough". For example, in lifelines and in R, a partial-log-lik or -85.01 is achieved. In the screenshot, a partial-log-lik of -86.38 is achieved. We want to maximize this value, so I suspect that the other methods are halting convergence too early.
I see the same situation happen in model 2: lifelines and R achieve a larger partial-log-lik, hence should be considered more accurate.
Can you change the convergence parameters in the Matlab code?