Agent skill · Data & Analytics

bio-clinical-biostatistics-survival-analysis

Performs time-to-event analysis for clinical trials including Cox proportional hazards regression with PH diagnostics, restricted mean survival time (RMST) under non-PH, competing risks via Fine-Gray vs cause-specific Cox, weighted log-rank and MaxCombo for non-proportional hazards, recurrent events (Andersen-Gill, PWP, WLW), and interval-censored data. Use when analyzing time-to-event endpoints (OS, PFS, DOR, TTR, TTNT) in oncology or other clinical trials.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeships scriptsNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill clinical-biostatistics__survival-analysis --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 36 KB
Bundled scripts: yes
Path: skills/bioskills/clinical-biostatistics__survival-analysis/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Performs time-to-event analysis for clinical trials, including Cox proportional hazards regression with PH diagnostics, RMST under non-PH, competing risks via Fine-Gray vs cause-specific Cox, weighted log-rank and MaxCombo for non-proportional hazards, recurrent events (Andersen-Gill, PWP, WLW), and interval-censored data. Use when analyzing time-to-event endpoints (OS, PFS, DOR, TTR, TTNT) in oncology or other clinical trials.

How it works

It emphasizes selecting methods based on PH validity, competing risks, and censoring patterns, and it provides recommended approaches for various scenarios. The skill references: PH diagnostics with scaled Schoenfeld residuals, cox.zph-like failure detector, and graphical checks; RMST calculation and interpretation; MaxCombo and weighted log-rank tests; Fine-Gray subdistribution hazard versus cause-specific Cox; Aalen-Johansen for CIF; multi-state and recurrent-event models (Andersen-Gill, PWP, WLW); interval-censored Cox with NPMLE. It shows code examples in Python using lifelines (CoxPHFitter, proportional_hazard_test, check_assumptions) and R equivalents for several analyses (survival, cmprsk, riskRegression, icenReg, mstate, flexsurv, stpm2, survRM2).

When to use it

Use when analyzing time-to-event endpoints (OS, PFS, DOR, TTR, TTNT) in oncology or other clinical trials. It places emphasis on scenarios like non-PH, competing risks, interval-censoring, and recurrent events, offering appropriate methods for each situation.

What it can touch

The skill uses the primary tool lifelines. It references additional R packages for specific analyses (cmprsk, riskRegression, icenReg, mstate, flexsurv, stpm2, survRM2, etc.), and shows code hooks with a Python import path and function names from lifelines. The executable scripts in the skill folder are shipped, and the primary tool is lifelines.

Caveats

It notes PH violations are common in modern oncology, and that RMST offers a hazard-free alternative under non-PH; it discusses potential limitations of Fine-Gray models for causal interpretation and emphasizes using CIF via Aalen-Johansen for prediction. It cautions tau choice in RMST, extrapolation risks, and the MaxCombo critique regarding directionality. It includes references to various literature and cautions about test power depending on g(t) transformations and sample size. The license is NOASSERTION.

From the SKILL.md

## Version Compatibility Reference examples tested with: lifelines 0.27+, scikit-survival 0.21+, statsmodels 0.14+, pandas 2.1+, numpy 1.26+. R packages cited (still the SOTA for survival): survival 3.8+, survRM2, cmprsk, riskRegression, mstate, flexsurv, icenReg, rpsftm. Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - R: `packageVersion('<pkg>')` then `?function_name` If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # Time-to-Event Analysis for Clinical Trials **"Analyze time-to-event endpoint"** -> Estimate a hazard, survival probability, cumulative incidence, or restricted mean time using a method calibrated to (a) whether proportional hazards holds, (b) whether competing events exist, (c) whether censoring is informative, and (d) which estimand the trial targets under ICH E9(R1). ## The Single Most Important Modern Insight -- PH Almost Never Holds In modern oncology with checkpoint inhibitors, targeted therapies, crossover, and depleted high-risk subjects o

What's inside
Steps it walks through
  1. Version Compatibility
  2. The Single Most Important Modern Insight -- PH Almost Never Holds
  3. Algorithmic Taxonomy
  4. Decision Tree by Scenario
  5. Cox PH Diagnostics -- The Therneau-Grambsch Test (and Its Pitfalls)
  6. Fixes when PH violated
  7. Restricted Mean Survival Time (RMST) -- The Modern Alternative
  8. The tau (truncation time) choice
  9. Pseudo-observation regression (Andersen-Klein 2007)
  10. Competing Risks -- The Andersen-Keiding Framework
  11. Fine-Gray subdistribution hazard
  12. Practical rule (Putter-Fiocco-Geskus 2007)
  13. The CIF is always estimable
  14. Log-Rank Variants and MaxCombo
Ships with 2 files
  • examples/survival_clinical.py
  • usage-guide.md
More from awesome-bio-agent-skills
All skills →
About this skill
What does the bio-clinical-biostatistics-survival-analysis skill do?

Performs time-to-event analysis for clinical trials including Cox proportional hazards regression with PH diagnostics, restricted mean survival time (RMST) under non-PH, competing risks via Fine-Gray vs cause-specific Cox, weighted log-rank and MaxCombo for non-proportional hazards, recurrent events (Andersen-Gill, PWP, WLW), and interval-censored data. Use when analyzing time-to-event endpoints (OS, PFS, DOR, TTR, TTNT) in oncology or other clinical trials.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill clinical-biostatistics__survival-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going