Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
29 changes: 29 additions & 0 deletions plots/survival-kaplan-meier/specification.md
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions plots/survival-kaplan-meier/specification.yaml
Original file line number Diff line number Diff line change
@@ -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