$npx skillfedfor your agent

lifelines

Lifelines is a Python survival analysis library built for medical research and epidemiology. It models time-to-event outcomes like disease progression or recovery, properly accounting for censored data from patients who leave studies early. Use it to estimate survival curves, compare treatment groups, and identify risk factors through Cox proportional hazards regression.

Lifelines analyzes clinical trial survival data using Kaplan-Meier curves and Cox regression to handle censored observations.

AI-generated summary based on this skill's SKILL.md

19 2 MITupdated by tondevrel

Decision gist · record as of 2026-02-01

Lifelines analyzes clinical trial survival data using Kaplan-Meier curves and Cox regression to handle censored observations. Lifelines is a Python survival analysis library built for medical research and epidemiology. It models time-to-event outcomes like disease progression or recovery, properly accounting for censored data from patients who leave studies early. Use it to estimate survival curves, compare treatment groups, and identify risk factors through Cox proportional hazards regression.

manual: git clone https://github.com/tondevrel/scientific-agent-skills → cp -r scientific-agent-skills/skills/lifelines ~/.claude/skills/lifelines
skills/lifelines/SKILL.md · version dd3ff2b5

Use it when

  • Lifelines is designed to properly handle censored time-to-event data in medical research by accounting for patients who leave studies early.
  • Yes.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

tondevrel/scientific-agent-skills/lifelines

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is lifelines and what does it do?

Lifelines is a Python survival analysis library built for medical research and epidemiology. It models time-to-event outcomes like disease progression or recovery, properly accounting for censored data from patients who leave studies early. Use it to estimate survival curves, compare treatment groups, and identify risk factors through Cox proportional hazards regression.

How does lifelines handle censored data in time-to-event analysis?

Lifelines is designed to properly handle censored time-to-event data in medical research by accounting for patients who leave studies early or whose events haven't occurred by the study end. Its core algorithms—including Kaplan-Meier estimation and Cox regression—incorporate censoring information directly, ensuring unbiased survival estimates even when follow-up is incomplete.

Can lifelines perform Kaplan-Meier curves for clinical trials?

Yes. Lifelines includes a Kaplan-Meier fitter that estimates and visualizes survival curves for clinical trials. It generates survival probability estimates over time and supports stratified analysis to compare outcomes between treatment groups, making it ideal for analyzing clinical trial survival data.

How do I use Cox regression to identify hazard ratios in lifelines?

Lifelines' Cox proportional hazards model quantifies risk factors by computing hazard ratios—the relative risk of an event between groups or per unit change in a covariate. Fit your time-to-event data with covariates, and the model outputs hazard ratios and confidence intervals to identify and measure which factors influence survival.

What statistical tests does lifelines provide for comparing survival outcomes?

Lifelines supports logrank tests and other statistical comparisons to test whether survival curves differ significantly between treatment groups. These tests help determine if observed differences in survival outcomes are statistically meaningful in clinical trial data analysis.

Is lifelines suitable for building predictive survival models?

Yes. Lifelines supports building predictive survival models for patient prognosis using Cox regression and parametric survival models like Weibull. These models estimate individual survival probabilities and can help clinicians assess disease progression and recovery risk.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Lifelines - Survival Analysis

In medicine, we often care about "Time to Event" (death, recovery, relapse). Lifelines handles the complexity of "censored" data (patients who left the study).

When to Use

  • Analyzing clinical trial data (time to death, disease progression).
  • Comparing survival between treatment groups.
  • Identifying risk factors using Cox Proportional Hazards regression.
  • Building survival models for prognosis.
  • Epidemiology studies (time to infection, recovery).

Core Principles

Censoring

Patients who haven't experienced the event by the end of the study are "censored". Lifelines properly accounts for this.

Hazard Ratios

In Cox regression, a hazard ratio > 1 means increased risk; < 1 means decreased risk.

Survival Curves

Kaplan-Meier estimates the probability of survival over time without assuming a distribution.

Quick Reference

Standard Imports

```python from lifelines import

(truncated - see the full file via the links below)

File tree — 1 file
skills/lifelines/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Analyze clinical trial survival data with Kaplan-Meier and Cox regression”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

Survival Analysis
by aj-geddes · aj-geddes/useful-ai-prompts

This skill teaches statistical methods for analyzing when events occur, accounting for incomplete observations where some subjects haven't experienced the event yet. You'll learn Kaplan-Meier estimation for survival curves, Cox regression for modeling risk factors, and log-rank tests for comparing groups—with practical Python implementations using lifelines.

MITupdated Mar 2026
★ 299repo stars
statistical-testing
by beita6969 · beita6969/ScienceClaw

Statistical Testing provides researchers with advanced methods for hypothesis testing, Bayesian inference, survival analysis, time series modeling, and meta-analysis. The skill covers multiple comparison corrections, effect size calculations, and bootstrap/permutation approaches with APA-compliant reporting standards.

MITupdated Jun 2026
★ 869repo stars
Scikit Survival Analysis
by jaechang-hits · jaechang-hits/SciAgent-Skills

Scikit Survival Analysis extends scikit-learn for right-censored survival data, offering Cox proportional hazards (including elastic net variants), ensemble methods like Random Survival Forests and Gradient Boosting, and survival SVMs. It provides censoring-aware evaluation metrics and non-parametric survival curve estimation.

no license declared → metadata onlyupdated Jul 2026
★ 284repo stars
scikit-survival
by synthetic-sciences · synthetic-sciences/openscience

scikit-survival is a Python library for survival analysis that handles censored data in time-to-event modeling. It offers Cox proportional hazards models, ensemble methods like Random Survival Forests and Gradient Boosting, and Survival SVMs, with evaluation metrics including concordance index and Brier score. Use it for competing risks analysis, Kaplan-Meier estimation, and any survival analysis workflow.

Apache-2.0updated Jul 2026
★ 2,896repo stars
scikit-survival
by K-Dense-AI · K-Dense-AI/scientific-agent-skills

scikit-survival 0.28.0 enables you to construct, tune, and assess survival workflows for right-censored outcomes using Cox models, ensemble methods, and kernel-based approaches. The skill enforces leakage-safe data splits, preprocessing pipelines, and proper metric selection—discrimination, calibration, and prediction error—while handling competing risks through nonparametric cumulative incidence.

MITupdated Jul 2026
★ 31,940repo stars
biostatistics
by beita6969 · beita6969/ScienceClaw

This skill handles survival analysis and time-to-event data common in clinical research, including Kaplan-Meier estimation, Cox proportional hazards regression, and competing risks modeling. It also covers longitudinal data analysis, diagnostic accuracy assessment, and missing data strategies tailored to biomedical studies.

MITupdated Jun 2026
★ 869repo stars

More skills statsmodels (MIT)

Tags
medical-statisticstime-to-eventbiostatisticsclinical-researchhazard-modelingepidemiological-analysiscensored-dataprognostic-modelingsurvival-curvesparametric-distributions