cox-survival-analysis

Analyzes time-to-onset data with Cox proportional-hazards models and generates survival curves and related metrics from RCTs or cohort studies.

64|12|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/MDhewei/bioinfor-claw --skill cox-survival-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cox-survival-analysis
Source: https://github.com/MDhewei/bioinfor-claw/tree/main/gene-centered-analysis/cox-survival-analysis
Command: npx skills add https://github.com/MDhewei/bioinfor-claw --skill cox-survival-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, matplotlib, scipy, and includes scripts (resource) components.

What problem does it solve?

Clinical researchers and data scientists need robust, reproducible Cox proportional hazards analyses that automate univariate and multivariate modeling, validate assumptions, and deliver publication-ready visuals.

Core Features & Use Cases

  • Univariate Cox modeling for individual covariates to screen predictors.
  • Multivariate Cox modeling with all specified covariates to estimate adjusted effects.
  • Proportional hazards validation via Schoenfeld residuals and associated diagnostics.
  • Risk scoring, Kaplan-Meier curves, and publication-ready forest plots.
  • Outputs including univariate/multivariate results, PH test, risk scores, and survival curves for manuscripts.

Quick Start

Run the cox-survival-analysis script with a TSV dataset, specifying time, event, and covariates to perform end-to-end survival analysis.

Frequently Asked Questions about cox-survival-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Cox proportional hazards analysis on clinical time-to-event data?

Cox proportional hazards analysis on clinical time-to-event data requires a TSV input with time, event indicators, and specified covariates to compute hazard ratios. The workflow automates univariate screening, multivariate modeling, and generates publication-ready forest plots.

What is the best way to check proportional hazards assumptions using Schoenfeld residuals?

Checking proportional hazards assumptions with Schoenfeld residuals involves testing covariate relationships over time. This analysis computes Schoenfeld residual plots and diagnostics to validate if hazard ratios remain constant across the follow-up period.

Can I use this Cox model workflow for datasets with under 100 clinical samples?

This Cox model workflow applies to clinical datasets ranging from 50 to 10,000 samples. Datasets with at least 50 samples provide sufficient statistical power for univariate screening and multivariate modeling.

How do I prepare categorical covariates for multivariate Cox modeling?

Preparing categorical covariates for multivariate Cox modeling requires one-hot encoding before analysis. You specify covariates in the input TSV, and the workflow applies encoding to categorical variables to estimate adjusted hazard ratios.

Why does my Cox survival analysis need Kaplan-Meier curves and risk scores?

Cox survival analysis needs Kaplan-Meier curves and risk scores to visualize survival differences and stratify patient groups. These outputs, alongside hazard ratios and forest plots, provide publication-ready evidence for clinical manuscripts.

Does this survival analysis workflow require pandas and matplotlib for forest plots?

This survival analysis workflow uses pandas for TSV data handling and matplotlib for generating forest plots. It also depends on numpy and scipy to compute hazard ratios and perform biostatistical modeling.