Cox regression
Models how covariates change the hazard of the event; Exp(B) is the hazard ratio.
Menu: Analyze → Survival → Cox Regression…
When should I use it?
- Several predictors of time to an event, some cases censored.
What are the assumptions?
- Proportional hazards (the effect of each covariate is constant over time).
- Enough events — about 10 per covariate.
How do I run it in StatLab?
- Choose time and status, add numeric covariates and categorical covariates (indicator coding, last category = reference).
- Choose Breslow (default) or Efron for tied times; optionally a strata variable.
- Choose a stepwise Method (Forward/Backward, LR or Wald) to let the data pick covariates.
- For a time-dependent covariate pick a variable x and the expression (x × T_, x × ln T_, or x × (T_ > c)); a significant coefficient means the effect of x changes over time.
How do I read the output?
| Output | Meaning |
|---|---|
| Omnibus Tests | -2 log likelihood, score test and likelihood-ratio change. |
| Exp(B) with 95% CI | Hazard ratio: above 1 = higher risk, below 1 = lower risk. |
| Variables not in the Equation | Score test for each candidate covariate at each step. |
| Model if Term Removed | Likelihood-ratio loss when a covariate is dropped (LR methods). |
| T_COV_ | The time-dependent covariate; testing it is a check of proportional hazards. |
Worked example
On the clinic follow-up practice dataset, this command — which the dialog's Paste button also produces — runs the procedure:
PROC svCox /time=months /status=relapse /event=1 /covs=(age stage) /cats=(treatment) /strata='' /ties=breslow /method=enter /pin=0.05 /pout=0.1 /tdVar='' /tdForm=x*ln(t).
Output tables: Case Processing Summary · Categorical Variable Codings · Omnibus Tests of Model Coefficients (Block 0) · Omnibus Tests of Model Coefficients · Variables in the Equation · Covariate Means.
How would I report it in APA style?
A Cox proportional-hazards model (118 events among 200 cases) improved on the null model, χ²(3) = 32.80, p < .001. Age at start (years): HR = 1.02, 95% CI [1.01, 1.04], p < .001; Disease stage: HR = 1.45, 95% CI [1.10, 1.89], p = .007; Treatment(1): HR = 2.05, 95% CI [1.41, 2.98], p < .001.
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Interpreting Exp(B) as an odds ratio or a ratio of survival times.