Search

PythonReactSEOPDF
OpenClaw

survival-analysis-km

Generates Kaplan-Meier survival curves, calculates survival statistics (log-rank test, median survival time), and estimates hazard ratios for clinical and biological survival data analysis. Triggered when user requests survival analysis, Kaplan-Meier plots, time-to-event analysis, or asks about survival statistics in biomedical contexts.

aipoch-ai0 source installs☆ 0 Repository starsv1.0.0

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install aipoch-ai/survival-analysis-km

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Survival Analysis (Kaplan-Meier)

Kaplan-Meier survival analysis tool for clinical and biological research. Generates publication-ready survival curves with statistical tests.

Features

  • Kaplan-Meier Curve Generation: Publication-quality survival plots with confidence intervals
  • Statistical Tests: Log-rank test, Wilcoxon test, Peto-Peto test
  • Hazard Ratios: Cox proportional hazards regression with 95% CI
  • Summary Statistics: Median survival time, restricted mean survival time (RMST)
  • Multi-group Analysis: Supports 2+ comparison groups
  • Risk Tables: Optional at-risk table below curves

Usage

Python Script
python scripts/main.py --input data.csv --time time_col --event event_col --group group_col --output results/
Arguments
Argument Description Required
--input Input CSV file path Yes
--time Column name for survival time Yes
--event Column name for event indicator (1=event, 0=censored) Yes
--group Column name for grouping variable Optional
--output Output directory for results Yes
--conf-level Confidence level (default: 0.95) Optional
--risk-table Include risk table in plot Optional
Input Format

CSV with columns:

  • Time column: Numeric, time to event or censoring
  • Event column: Binary (1 = event occurred, 0 = censored/right-censored)
  • Group column: Categorical variable for stratification

Example:

patient_id,time_months,death,treatment_group
P001,24.5,1,Drug_A
P002,36.2,0,Drug_A
P003,18.7,1,Placebo
Output Files
  • km_curve.png: Kaplan-Meier survival curve
  • km_curve.pdf: Vector version for publications
  • survival_stats.csv: Statistical summary (median survival, confidence intervals)
  • hazard_ratios.csv: Cox regression results with HR and 95% CI
  • `logrank_test.csv**: Pairwise comparison p-values
  • `report.txt**: Human-readable summary report

Tec...

Source information

Source
github
Repository
openclaw/skills
Path
skills/aipoch-ai/survival-analysis-km
Version
1.0.0
Commit
3423325ff6e4cec6aa7bd6dfd6991fc459a038fd
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Survival Analysis (Kaplan-Meier)

Kaplan-Meier survival analysis tool for clinical and biological research. Generates publication-ready survival curves with statistical tests.

## Features

- **Kaplan-Meier Curve Generation**: Publication-quality survival plots with confidence intervals
- **Statistical Tests**: Log-rank test, Wilcoxon test, Peto-Peto test
- **Hazard Ratios**: Cox proportional hazards regression with 95% CI
- **Summary Statistics**: Median survival time, restricted mean survival time (RMST)
- **Multi-group Analysis**: Supports 2+ comparison groups
- **Risk Tables**: Optional at-risk table below curves

## Usage

### Python Script

```bash
python scripts/main.py --input data.csv --time time_col --event event_col --group group_col --output results/
```

### Arguments

| Argument | Description | Required |
|----------|-------------|----------|
| `--input` | Input CSV file path | Yes |
| `--time` | Column name for survival time | Yes |
| `--event` | Column name for event indicator (1=event, 0=censored) | Yes |
| `--group` | Column name for grouping variable | Optional |
| `--output` | Output directory for results | Yes |
| `--conf-level` | Confidence level (default: 0.95) | Optional |
| `--risk-table` | Include risk table in plot | Optional |

### Input Format

CSV with columns:
- **Time column**: Numeric, time to event or censoring
- **Event column**: Binary (1 = event occurred, 0 = censored/right-censored)
- **Group column**: Categorical variable for stratification

Example:
```csv
patient_id,time_months,death,treatment_group
P001,24.5,1,Drug_A
P002,36.2,0,Drug_A
P003,18.7,1,Placebo
```

### Output Files

- `km_curve.png`: Kaplan-Meier survival curve
- `km_curve.pdf`: Vector version for publications
- `survival_stats.csv`: Statistical summary (median survival, confidence intervals)
- `hazard_ratios.csv`: Cox regression results with HR and 95% CI
- `logrank_test.csv**: Pairwise comparison p-values
- `report.txt**: Human-readable summary report

## Tec...

Related skills

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

wps-macos-helper

lethehades

macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance