survival-analysis

Installation
SKILL.md

Survival Analysis

TL;DR — Estimate time-to-event models: Kaplan-Meier curves with log-rank test, Cox PH model with proportional-hazards diagnostics (Schoenfeld residuals), Weibull AFT, and competing risks (Aalen-Johansen / Fine-Gray) using lifelines.


When to Use

Use this Skill when you need to:

  • Estimate and plot Kaplan-Meier survival curves for one or more groups.
  • Compare group survival with the log-rank test or Wilcoxon test.
  • Fit a Cox proportional hazards model and interpret hazard ratios.
  • Check the PH assumption with Schoenfeld residuals and log-log plots.
  • Model time to failure with a parametric AFT model (Weibull, Log-Normal, Log-Logistic).
  • Handle competing events with cause-specific cumulative incidence functions (CIF).
  • Include time-varying covariates using long-format data.
Installs
10
GitHub Stars
38
First Seen
Mar 30, 2026