Survival Analysis in Python
Shae Wang
Senior Data Scientist
If the covariate only has a few values, inspect each group's Kaplan-Meier curve.
If the covariate only has a few values, inspect each group's Kaplan-Meier curve.
If the covariate only has a few values, inspect each group's Kaplan-Meier curve.
If the covariates are continuous, use the .check_assumptions()
method.
training_df
: the original DataFrame used in the call to fit the model.p_value_threshold
: the threshold to use to alert the user of violations (default: 0.01, recommended: 0.05).model.check_assumptions(training_df, p_value_threshold=0.05)
1. Variable 'A' failed the non-proportional test: p-value is 0.0007.
Advice 1: ...
Advice 2: ...
2. Variable 'B' failed the non-proportional test: p-value is 0.0063.
Advice 1: ...
Advice 2: ...
Survival Analysis in Python