Survival Analysis
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.
Survival Analysis lets you model time-to-event data with censoring using Kaplan-Meier curves and Cox proportional hazards regression.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-03-04
Survival Analysis lets you model time-to-event data with censoring using Kaplan-Meier curves and Cox proportional hazards regression. 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.
Use it when
- Survival Analysis covers Kaplan-Meier curve construction using the lifelines package.
- Survival Analysis teaches Cox regression as a semi-parametric method to model how risk factors affect event timing.
Verify before relying
Read SKILL.md below before installing (3 files). Open directory: indexed for reading, not audited.
Install
aj-geddes/useful-ai-prompts/survival-analysis · repository language: Shell
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 Survival Analysis time to event modeling?
Survival Analysis is a statistical skill for analyzing when events occur while accounting for censoring—incomplete observations where some subjects haven't experienced the event yet. It teaches 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. Applications span clinical trials, customer churn, and equipment reliability.
How do you build kaplan meier curves in Python?
Survival Analysis covers Kaplan-Meier curve construction using the lifelines package. You estimate survival probabilities at each event time, accounting for censored observations. The skill teaches how to plot these curves to visualize survival over time, compare multiple groups visually, and extract key statistics like median survival time and confidence intervals for clinical trials and reliability studies.
What does the cox proportional hazards model do?
Survival Analysis teaches Cox regression as a semi-parametric method to model how risk factors affect event timing. It estimates hazard ratios showing how covariates influence the instantaneous event rate, handles censored data naturally, and doesn't require assuming a specific survival distribution. The skill includes assessing proportional hazards assumptions and interpreting model diagnostics for valid inference.
How do you compare survival curves between treatment groups?
Survival Analysis covers log-rank tests for statistically comparing survival curves between groups. The skill teaches hypothesis testing to determine if treatment groups have significantly different survival experiences, calculates test statistics and p-values, and interprets results in context of clinical or business decisions. It also covers visualization techniques for presenting group comparisons clearly.
Can Survival Analysis predict outcomes for new patients?
Yes. Survival Analysis teaches survival probability estimation and risk stratification methods to predict outcomes for new patients or subjects. You learn to build predictive models using Cox regression or parametric approaches, generate personalized survival curves, and classify patients into risk groups. The skill enables clinical decision-making and resource allocation based on predicted survival probabilities.
What parametric models does Survival Analysis cover?
Survival Analysis teaches parametric survival models including Weibull and exponential distributions for reliability and churn prediction. These models assume a specific survival distribution, enabling extrapolation beyond observed data and direct probability calculations. The skill covers when to use parametric versus semi-parametric approaches, model fitting, and applications in equipment reliability and customer lifetime value analysis.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Survival Analysis
Overview
Survival analysis studies time until an event occurs, handling censored data where events haven't happened for some subjects, enabling prediction of lifetimes and risk assessment.
Key Concepts
- Survival Time: Time until event
- Censoring: Event not observed (subject dropped out)
- Hazard: Instantaneous risk at time t
- Survival Curve: Probability of surviving past time t
- Hazard Ratio: Relative risk between groups
Common Models
- Kaplan-Meier: Non-parametric survival curves
- Cox Proportional Hazards: Semi-parametric regression
- Weibull/Exponential: Parametric models
- Log-rank Test: Comparing survival curves
- Competing Risks: Multiple event types
Implementation with Python
```python import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from lifelines import KaplanMeierFitter, CoxPHFitter, WeibullAFTFitter from lifelines.statistics import logrank_test import
(truncated - see the full file via the links below)
File tree — 3 files
skills/survival-analysis/SKILL.md
skills/survival-analysis/scripts/scaffold-analysis.sh
skills/survival-analysis/templates/notebook-template.py
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 time-to-event data with censoring using Kaplan-Meier and Cox models”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
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.
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.
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.
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.
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.
Time Series Analysis breaks down temporal data into its component parts—trend, seasonality, and residuals—to uncover patterns and make predictions. Use it to forecast future values, detect cyclical behavior, and understand how variables change over time through techniques like ARIMA, exponential smoothing, and decomposition.
More skills Data Visualization (MIT) · scikit-survival (MIT) · Statistical Hypothesis Testing (MIT)