diff --git a/plots/survival-kaplan-meier/implementations/.gitkeep b/plots/survival-kaplan-meier/implementations/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plots/survival-kaplan-meier/metadata/.gitkeep b/plots/survival-kaplan-meier/metadata/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plots/survival-kaplan-meier/specification.md b/plots/survival-kaplan-meier/specification.md new file mode 100644 index 0000000000..9eb53519fd --- /dev/null +++ b/plots/survival-kaplan-meier/specification.md @@ -0,0 +1,29 @@ +# survival-kaplan-meier: Kaplan-Meier Survival Plot + +## Description + +A Kaplan-Meier survival plot visualizes the probability of survival (or event-free time) over a time period using a step function. It is the standard method for estimating survival functions from time-to-event data, handling censored observations where the event has not yet occurred. The plot shows how survival probability decreases over time, with optional confidence intervals and comparison between groups. + +## Applications + +- Medical research tracking patient survival rates after diagnosis or treatment +- Reliability engineering analyzing time-to-failure for equipment or components +- Customer analytics measuring time-to-churn or subscription retention +- Clinical trials comparing survival outcomes between treatment and control groups + +## Data + +- `time` (numeric) - Time to event or censoring (e.g., days, months, years) +- `event` (binary) - Event indicator (1 = event occurred, 0 = censored) +- `group` (categorical, optional) - Grouping variable for comparing survival curves +- Size: 50-1000 observations +- Example: Clinical trial data with patient survival times and treatment groups + +## Notes + +- Use step function (not smooth curves) to accurately represent discrete event times +- Include 95% confidence intervals as shaded bands around the survival curve +- Mark censored observations with tick marks on the curve +- When comparing groups, use distinct colors and include a legend +- Consider adding median survival time annotation and at-risk table below the plot +- Log-rank test p-value can be included when comparing groups diff --git a/plots/survival-kaplan-meier/specification.yaml b/plots/survival-kaplan-meier/specification.yaml new file mode 100644 index 0000000000..9a197e02dc --- /dev/null +++ b/plots/survival-kaplan-meier/specification.yaml @@ -0,0 +1,33 @@ +# Specification-level metadata for survival-kaplan-meier +# Auto-synced to PostgreSQL on push to main + +spec_id: survival-kaplan-meier +title: Kaplan-Meier Survival Plot + +# Specification tracking +created: 2025-12-29T22:39:04Z +updated: null +issue: 2441 +suggested: MarkusNeusinger + +# Classification tags (applies to all library implementations) +# See docs/concepts/tagging-system.md for detailed guidelines +tags: + plot_type: + - survival + - step + - line + data_type: + - numeric + - timeseries + - categorical + domain: + - healthcare + - statistics + - research + - engineering + features: + - basic + - confidence-interval + - censored-data + - comparison