CamDavidsonPilon / lifelines

Survival analysis in Python
lifelines.readthedocs.org
MIT License
2.32k stars 551 forks source link

ensure plotting in check_assumptions (file mixins.py) #1518

Closed nomennominatur closed 1 year ago

nomennominatur commented 1 year ago

The plotting code section for check_assumptions in mixins.py has been moved so that it will plot Schoenfeld residuals whenever show_plots = True, regardless of the numeric test result.

Justification:

- Consistency of behaviour of check_assumptions

- Visual plausibility checking of PH test result.

(This is my first ever pull request, so please bear with me, if I did something wrong or inadvertently have violated the code of conduct. Feedback appreciated.)

CamDavidsonPilon commented 1 year ago

Yea, I like this: the user is being explicit about plots been shown, and so the computer should obey.

PR looks good!

Thanks @nomennominatur!

nomennominatur commented 1 year ago

Thanks @CamDavidsonPilon for the fast review & merge, and also for the kind reception! I feel honored having made a miniscule contribution to such a wonderful project.