survival-analysis-tools

Perform Kaplan-Meier summaries, log-rank tests, and Cox proportional hazards models.

126|8|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/DrugClaw/DrugClaw --skill survival-analysis-tools
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: survival-analysis-tools
Source: https://github.com/DrugClaw/DrugClaw/tree/main/skills/science/survival-analysis-tools
Command: npx skills add https://github.com/DrugClaw/DrugClaw --skill survival-analysis-tools

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of performing survival and time-to-event analyses, providing clear summaries and visualizations for censored data.

Core Features & Use Cases

  • Kaplan-Meier Summaries: Generate survival probability tables and plots.
  • Log-Rank Tests: Compare survival distributions between different groups.
  • Cox Proportional Hazards Models: Fit regression models to identify factors influencing survival time and estimate hazard ratios.
  • Use Case: Analyze patient survival data from a clinical trial to determine if a new treatment arm shows a statistically significant improvement in progression-free survival compared to the standard arm, while accounting for covariates like age and disease stage.

Quick Start

Use the survival-analysis-tools skill to generate Kaplan-Meier summaries and Cox proportional hazards models for the dataset in 'survival/nsclc.csv', using 'pfs_days' as the time column and 'progressed' as the event column.

Frequently Asked Questions about survival-analysis-tools

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform Kaplan-Meier survival analysis on censored clinical trial data?

Kaplan-Meier survival analysis summarizes time-to-event data by estimating survival probabilities across time points while properly handling censored observations. This skill generates survival probability tables and plots directly from datasets using pandas and matplotlib.

Can I use Cox proportional hazards models to estimate hazard ratios with covariates like age and disease stage?

Cox proportional hazards models estimate hazard ratios by fitting regression models to identify factors influencing survival time. This skill fits these models using statsmodels, allowing you to account for covariates like age and disease stage in research datasets.

What is the best way to compare survival distributions between different treatment groups?

Comparing survival distributions between different groups is typically done using log-rank tests. This skill performs log-rank tests to determine if survival curves differ significantly between groups, producing reproducible outputs for clinical trial analysis.

Do I need to install scikit-survival to run Cox proportional hazards and log-rank tests?

You do not need scikit-survival for standard workflows; numpy, pandas, statsmodels, and matplotlib provide the core functionality for Kaplan-Meier summaries, log-rank tests, and Cox models. The sksurv package is only an optional dependency for advanced machine-learning models.

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

Survival analysis handles censored data by accounting for subjects whose event has not occurred or is lost to follow-up before the study ends. This skill processes censored time-to-event observations to generate accurate survival probability estimates without biasing the results.