
Lifelines¶
lifelines is a implementation of survival analysis in Python. What benefits does lifelines offer over other survival analysis implementations?
- built on top of Pandas
- internal plotting methods
- simple and intuitive API (designed for humans)
- only does survival analysis (No unnecessary features or second-class implementations)
Contents:¶
- Quickstart
- Introduction to Survival Analysis
- Survival analysis with lifelines
- Survival Regression
- More Examples and Recipes
- Statistically compare two populations
- Model selection using lifelines
- Displaying at-risk counts below plots
- Transforming survival-table data into lifelines format
- Transforming observational data into survival-table format
- Plotting multiple figures on a plot
- Plotting options and styles
- Set the index/timeline of a estimate
- Example SQL query to get survival data from a table
- Example SQL queries and transformations to get time varying data
- Example cumulative total using
add_covariate_to_timeline
- Sample size determination under a CoxPH model
- Power determination under a CoxPH model
- Problems with convergence in the Cox Proportional Hazard Model
Installation¶
Dependencies are from the typical Python data-stack: Numpy, Pandas, Scipy, and optionally Matplotlib. Install using:
pip install lifelines
Source code and Issue Tracker¶
Available on Github, CamDavidsonPilon/lifelines Please report bugs, issues and feature extensions there. We also have Gitter channel open to discuss lifelines: