This notebook demonstrates the basics of survival analysis, a method used for analyzing time to event data, using Python. It has 6 sections.
- A brief introduction to survival analysis and the data used in this notebook
- Non-parametric methods: Kaplan-meier curves, Log-rank test statistic for โฅ2 groups
- Semi-parametric methods: Cox proportional hazard model, Schoenfeld residuals, log-log plots
- Parametric methods: Exponential (accelerated failure time (AFT), proportional hazards (PH)), Weibull (AFT, PH), Gompertz (PH), Log-logistic (proportional odds (PO)), Log-normal (AFT), Generalized Gamma (AFT)
- Constructing confidence intervals for survival predictions for the models in section 4
- Appendix A: Parametric Model Results with Different Optimization Methods