Statsly
survival

Cox proportional hazards

Model time-to-event outcomes with covariates.

Requirements

  • time
  • event indicator
  • predictor(s)

Avoid when

  • severe proportional-hazards violations

Formula

h(t|x) = h₀(t) exp(xᵀβ)

Interpretation

Exponentiated coefficients are hazard ratios.

Worked example

Estimate adjusted hazard ratios for treatment, age, and disease stage.

Open example datasets