Comprehensive survival analysis with risk stratification, C-index concordance, Kaplan-Meier curves, and Schoenfeld residual diagnostics.
Automatic tertile-based risk groups with separate survival curves for each.
C-index concordance, cox.zph tests, Schoenfeld residuals, and three model test statistics.
Survival probabilities at 6, 12, 24, 36, 48, and 60-month intervals with CIs.
Provide time_column, event_column (1=event, 0=censored), and array of covariates. Optional strata for stratified models.
Automatically converts categorical variables to factors, calculates risk scores, creates tertile-based risk groups, performs comprehensive model testing (likelihood ratio, Wald, score tests), and identifies top risk factors sorted by effect size.
From fitting to validating assumptions
Cox model with hazard ratios, baseline hazard, and C-index concordance metric.
Cox.zph proportionality test, Schoenfeld residuals, three global test statistics.
Create risk tertiles, generate KM curves by group, identify top risk factors.
Comprehensive survival analysis with automatic risk stratification—identify high-risk groups and quantify factor impacts.
The implementation uses the survival package, automatically creates risk tertiles (Low/Medium/High), calculates C-index for model discrimination, provides survival probabilities at 6 key milestones, performs three global model tests (likelihood ratio, Wald, score), and identifies significant risk factors sorted by effect size. Includes baseline hazard calculation and supports optional stratification.
Note: Automatically converts character columns to factors. Reports censoring rate and median survival. Tests proportional hazards assumption with cox.zph.
Get hazard ratios, survival curves, and diagnostics
Read the article: Cox PH Survival