Cox Proportional-Hazards Regression
The workhorse of multivariable survival analysis: it analyses the effect of several covariates on survival (time to event) and outputs each factor's hazard ratio HR, 95% confidence interval, Wald-test p value, and the model likelihood-ratio test. Ties are handled with the Breslow approximation. Computed locally in your browser; data are not uploaded. Pair it with the Kaplan-Meier tool for univariate analysis.
① Paste data
First row is column names, then one subject per row: must include survival time, event status (1=event / 0=censored), and several covariates. Covariates must be numeric (encode categorical variables as 0/1 dummies first). You can paste from Excel.
How to use & methodology
How does Cox regression differ from Kaplan-Meier?
Kaplan-Meier does univariate survival analysis, draws survival curves, and compares groups with the log-rank test; Cox regression is a multivariable method that adjusts for several covariates simultaneously and gives each factor's adjusted hazard ratio HR. They are often used together: KM for trends, Cox for multivariable analysis.
How do I interpret the hazard ratio HR?
HR is the multiple by which the (instantaneous) hazard changes per 1-unit increase in that covariate. HR=2 doubles the risk, HR=0.5 halves it, HR=1 means no effect. For a continuous variable the HR is the per-unit effect; categorical variables must be dummy-coded to 0/1, and the HR is relative to the reference group.
How do I put categorical variables into the model?
Covariates here must be numeric. Code a binary variable directly as 0/1; split a multi-category variable (e.g. stage I/II/III) into several 0/1 dummies (with one category as reference) and include each as a covariate. Ordinal variables can also be approximated by their rank values.
What if it says 'information matrix is not invertible'?
Usually the covariates are highly collinear, or one covariate is completely separated from the outcome (all events or none at some value), or there are too few subjects/events. Reduce covariates, merge sparse categories, or increase the sample.
Why do the HRs differ slightly from R/SPSS?
This tool handles ties with the Breslow approximation (matching the SAS default); R's coxph defaults to the Efron method. When many events share a time, the two differ a little; with no ties they are identical.