Cox Proportional Hazards Regression
Cox Regression models time-to-event outcomes against multiple covariates simultaneously, producing hazard ratios that quantify how each covariate affects the event rate while adjusting for all others.
Step 1 — Provide your data
Each row needs:
- Time — follow-up time
- Event — 1 (event) or 0 (censored)
- Covariates — numeric or categorical predictors
Supports Excel Import (with ColumnSelector and CategoryMapper), Sample Data Selector, and Manual Entry.
Step 2 — Choose reference categories
For categorical covariates, pick the baseline level. HRs are reported relative to this reference.
Step 3 — Results
Covariate table:
- Coefficient (beta), HR = exp(beta), 95% CI, SE, Z-score, p-value
Model Fit:
- Log-likelihood, Chi-square (LR test), df, overall p-value
- Concordance Index (C-index)
- Pseudo R-squared, Partial AIC
Proportional Hazards Test — Schoenfeld residual-based test per covariate.
Visualisations:
- Hazard Ratio Forest Plot
- Survival Plot at representative covariate values
A UniversalChatBot is available for discussion.
Statistical methods used
Model
h(t|X) = h0(t) * exp(beta1*X1 + ... + betap*Xp)
Semiparametric: baseline hazard h0(t) left unspecified.
Estimation — Partial Likelihood via Newton-Raphson
- Max iterations: 20
- Convergence: max |score| < 1e-6
- Step halving when |beta| > 10
Hazard Ratios with 95% CI (Wald)
HR = exp(beta), CI: exp(beta +/- 1.96 * SE)
Overall model — Likelihood Ratio Test
chi2 = 2 * (logL_full - logL_null) with df = p.
Concordance Index
Proportion of concordant pairs (higher risk score = shorter survival).
Proportional Hazards Assumption
Schoenfeld residuals test for time-varying effects. p < 0.05 suggests violation.