CamDavidsonPilon / lifelines

Survival analysis in Python
lifelines.readthedocs.org
MIT License
2.34k stars 554 forks source link

plot_partial_effects_on_outcome is not defined for CoxTimeVaryingFitter #1130

Open jayantsahewal opened 4 years ago

jayantsahewal commented 4 years ago

After fitting a CoxTimeVaryingFitter when I try to use plot_partial_effects_on_outcome, it throws an error saying:

AttributeError: 'CoxTimeVaryingFitter' object has no attribute 'plot_partial_effects_on_outcome'

I tried plot_covariate_groups() as well which says:

NameError: name 'plot_partial_effects_on_outcome' is not defined

Am I doing something wrong or plot_partial_effects_on_outcome has not yet been implemented for CoxTimeVaryingFitter.

Dekermanjian commented 3 years ago

Hi, this was an issue I also ran into during my analysis. I noticed that this does not have a tag of next minor/major release. Is this not on your to-do list currently?

CamDavidsonPilon commented 3 years ago

Hi @Dekermanjian - it's not clear to me how this should work because prediction in time-varying scenarios has epistemological problems. For example: we would need to produce a survival curve ....

Actually, I might have a solution. I don't know if it's correct or not.

rpforrest1 commented 3 years ago

~Hi @Dekermanjian - it's not clear to me how this should work because prediction in time-varying scenarios has epistemological problems. For example: we would need to produce a survival curve .... ~

Actually, I might have a solution. I don't know if it's correct or not.

May I ask, what solution are you looking in to? Is plotting a time varying model a “normal” thing to do?

Tikavdm commented 3 years ago

Is there any progress or update on this?