Open aisling-om opened 4 years ago
The numbers given above are from 22.4, but 24.4 only changes things very slightly.
Thanks for the detailed issue @aongus, I'll look into this asap
hi @CamDavidsonPilon have you had any chance to look into this?
ack sorry, it's a high priority but am stuck on it. I haven't made much progress, unfortunately.
thanks for giving it a shot!
Hi @aongus, I've dug a bit into this recently, and the problem may be due to R changing their algorithm recently for computing these values, see https://github.com/CamDavidsonPilon/lifelines/issues/997#issuecomment-652567848
Hi @CamDavidsonPilon , thanks for figuring this out. I can see how these numbers will be different from different regressors/implementations.
I guess tho from my perspective the more immediate issue was that using weighted vs unweighted data produced totally different results.
I've been comparing CoxPH results for R's Survival and Lifelines, and I've noticed huge differences for the output of the test for proportionality when I use weights instead of repeated rows. The hazard ratio estimate and CI's are very close, but the proportionality chisq is very different.
I've attached a csv (txt because Github) with sample data.
The R (Survival) code is:
The Lifelines code is:
For the attached data, using weights, I get from Lifelines:
from R:
Whereas using a row per entry and no weights, I get Lifelines:
R:
So the hazard ratio values and errors are in good agreement, but the chi-square for proportionality is way off when using weights in Lifelines (6 vs 30). thanks. hr.txt