StatLabStudent EditionUser guideGalleryFeaturesAbout

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?

What are the assumptions?

How do I run it in StatLab?

  1. Choose time and status, add numeric covariates and categorical covariates (indicator coding, last category = reference).
  2. Choose Breslow (default) or Efron for tied times; optionally a strata variable.
  3. Choose a stepwise Method (Forward/Backward, LR or Wald) to let the data pick covariates.
  4. 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?

OutputMeaning
Omnibus Tests-2 log likelihood, score test and likelihood-ratio change.
Exp(B) with 95% CIHazard ratio: above 1 = higher risk, below 1 = lower risk.
Variables not in the EquationScore test for each candidate covariate at each step.
Model if Term RemovedLikelihood-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?

Open StatLab   All guide topics