skglm icon indicating copy to clipboard operation
skglm copied to clipboard

FEAT - Strata in COX model

Open hermanhmchan opened this issue 9 months ago • 3 comments

Description of the feature

Can you support strata in COX model? It is included in lifetimes and statsmodels.

Additional context

https://lifelines.readthedocs.io/en/latest/fitters/regression/CoxPHFitter.html https://www.statsmodels.org/stable/generated/statsmodels.duration.hazard_regression.PHReg.predict.html#statsmodels.duration.hazard_regression.PHReg.predict

hermanhmchan avatar May 11 '24 12:05 hermanhmchan

Hello @hermanhmchan , Thanks a lot for your interest! Could you tell us more about how important/useful this option is in your community? (maybe @Klopfe or @PABannier knows). Would you be able to start a PR to implement this feature?

QB3 avatar May 12 '24 11:05 QB3

Cox models are very common in many businesses like for actuaries / insurance risk businesses

agramfort avatar May 12 '24 17:05 agramfort

We currently implement a Cox model. I was wondering how important is the strata option: it seems to be some kind of group weight for the Cox datafit. If this is the case, this might be not too hard to implement since the Cox datafit already has a weighting option

QB3 avatar May 12 '24 21:05 QB3