Commit 8ce3a74
authored
spec: add survival-kaplan-meier specification (#2449)
## New Specification: `survival-kaplan-meier`
Related to #2441
---
### specification.md
# 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
---
**Next:** Add `approved` label to the issue to merge this PR.
---
:robot: *[spec-create
workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20584237116)*
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 3cc18aa commit 8ce3a74
File tree
4 files changed
+62
-0
lines changed- plots/survival-kaplan-meier
- implementations
- metadata
4 files changed
+62
-0
lines changedWhitespace-only changes.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments