Cox regression (several characteristics and the time to an event)
In brief
Kaplan-Meier and the log-rank test compare the curves of groups. The Cox regression lets several characteristics act on the time to the event at once: a group and age and prior achievement. For every characteristic it gives a hazard ratio (HR) with an interval. It is chosen in the question "How long does it take until an event?" under "More options" → "Cox regression, columns". Statable calculates it with R (package survival); R is loaded once the first time (the button names the size).
What the hazard ratio means
- The hazard is the momentary risk that the event happens now for someone for whom it has not happened yet. The HR compares two hazards: HR = 1.8 means that the event occurs at any time with 1.8 times the hazard. HR = 1 means no difference; below 1 the hazard falls.
- An HR is not a risk ratio. HR = 1.8 does not mean that the event is 1.8 times as likely.
- For groups the HR is against the first group (reference group); for numbers it holds per additional unit. Whether a whole column contributes is shown by the likelihood ratio test.
Requirements
- Proportional hazards: the ratio of the hazards stays the same over time. Statable checks it with the score test cox.zph (Grambsch and Therneau 1994), for each characteristic and overall. With p < .05 the note comes first in the result: the HR then changes over time, a single HR summarizes that only roughly. Crossing curves in the chart are a sign of it.
- Rule of thumb: at least 10 events per coefficient (Peduzzi et al. 1995). A group column with k levels counts k − 1. With fewer events the HRs are very uncertain, and Statable shows a note, even before calculating.
- The method assumes that leaving the observation has nothing to do with the risk (non-informative censoring). Statable cannot check this.
- Numbers and group columns with 2 to 12 levels can be chosen, at most 8 columns. Missing values leave the row out (listwise).
Reading the result
- Table "Cox regression: hazard ratios": B, standard error, z, p, HR and the 95% interval of the HR (Wald). If 1 lies in the interval, the relationship is not shown.
- Model test: the likelihood ratio test checks whether the model explains the time to the event better than one without characteristics.
- Concordance (Harrell's C): the share of comparable pairs the model orders correctly; .50 would be chance. It only describes and is not a test.
Efron and Breslow
When several people have the event at the same time (tied times), there are several ways to calculate. Statable calculates by Efron, as R does, which is more accurate. SPSS (COXREG) calculates by Breslow; with many tied times B, standard error and HR differ slightly (hardly at all with few tied times). There is no switch.
Reporting the result
Cox regression: LR test χ²(3) = 30.50, p < .001; HR = 1.01, 95% CI [0.99, 1.03], p = .232 (age); HR = 0.58, 95% CI [0.41, 0.80], p = .001 (sex: women); HR = 1.59, 95% CI [1.27, 1.99], p < .001 (ph.ecog); 227 people, 164 events; C = .64
Example (survival::lung, Loprinzi et al. 1994, 228 people with advanced lung cancer): for women death occurs at any time with 0.58 times the hazard of men, at the same age and the same ph.ecog (HR = 0.58, 95% CI [0.41, 0.80], p = .001). Do not word it causally; name the assumption of proportional hazards and the number of events.
For specialists
survival::coxph (version 3.8), ties = "efron", Wald test and Wald interval with qnorm(.975); likelihood ratio test of the model and for each characteristic from the model without it on the same cases; cox.zph with transform = "km" (score test), per characteristic (groups together) and GLOBAL; concordance from coxph. Checked against R on the Mac and against an own maximization of the partial likelihood (Efron and Breslow, without survival), with tolerance 1e-6. Right-censoring only, one event per person, no time-dependent covariates, no stratification.
library(survival)
m <- coxph(Surv(time, status) ~ age + sex + ph.ecog, data = lung, ties = "efron")
summary(m)
cox.zph(m, transform = "km", terms = TRUE)
Sources
Cox, D. R. (1972). Regression models and life-tables. Journal of the Royal Statistical Society B, 34, 187-220. Grambsch, P. M. & Therneau, T. M. (1994). Proportional hazards tests and diagnostics based on weighted residuals. Biometrika, 81, 515-526. Peduzzi, P., Concato, J., Feinstein, A. R. & Holford, T. R. (1995). Importance of events per independent variable in proportional hazards regression analysis. Journal of Clinical Epidemiology, 48, 1503-1510. Efron, B. (1977). The efficiency of Cox's likelihood function for censored data. Journal of the American Statistical Association, 72, 557-565. Harrell, F. E. et al. (1982). Evaluating the yield of medical tests. JAMA, 247, 2543-2546.