From Cox Coefficients to Survival Predictions
A fitted Cox model can summarize how covariates relate to event timing without specifying a parametric distribution for the baseline hazard. Its coefficients are often reported as hazard ratios, but a hazard ratio is not a survival probability. To predict survival for a particular covariate profile, we also need an estimate of the baseline cumulative hazard. This tutorial develops both parts of that calculation and clarifies what each quantity means.
The model assumes that the covariate effect multiplies the baseline hazard by a factor that does not vary over time. It also assumes that the specified covariates and their functional forms adequately describe the modeled hazard relationship. For the usual right-censored-data estimation procedures, censoring must be non-informative conditional on the modeled covariates: among individuals with the same covariates, censoring should not provide additional information about their event time. These assumptions concern the model and observation process; they do not, on their own, make the fitted associations causal.
Interpreting Cox Coefficients
For a one-unit increase in covariate \(x_k\), holding the other covariates fixed, the model's hazard ratio is \(\exp(\beta_k)\). More generally, for two profiles \(x_A\) and \(x_B\), their conditional hazard ratio is \(\exp((x_A-x_B)^\top\beta)\). The ratio is constant over time under the proportional-hazards model. A positive coefficient corresponds to a higher conditional hazard; a negative coefficient corresponds to a lower one.
A hazard compares instantaneous event rates among individuals who have remained event-free up to time \(t\). Therefore, a hazard ratio does not directly state how much the probability of surviving to a particular time changes. The survival comparison also depends on the baseline cumulative hazard accumulated by that time.
Worked Example: Interpreting a Coefficient and Its Interval
Suppose a hypothetical Cox model for time to hospital discharge includes an indicator for a discharge-planning program, coded 1 for program participants and 0 otherwise. The estimated coefficient is \(\hat\beta=-0.40\), with standard error \(0.16\). Interpret the coefficient, conditional on the other modeled covariates.
The estimated hazard ratio for program participation versus no participation is $$ \exp(\hat\beta)=\exp(-0.40)=0.6703. $$
At any given time, among patients still in hospital and with the same values of the other modeled covariates, the estimated instantaneous discharge hazard for participants is 0.6703 times the hazard for nonparticipants. Equivalently, the estimated conditional discharge hazard is about \(1-0.6703=0.3297\), or 33.0%, lower. This is not a statement that participants are 33.0% less likely to be discharged by a specified date.
For illustration, a large-sample 95% Wald interval for the coefficient is $$ -0.40\pm 1.96(0.16)=[-0.7136,-0.0864]. $$ Exponentiating the endpoints gives the hazard-ratio interval $$ [\exp(-0.7136),\exp(-0.0864)]=[0.4899,0.9172]. $$
Under the fitted model and the usual large-sample approximation, this interval estimates a range of plausible values for the conditional hazard ratio. It does not give a 95% probability that the fixed population hazard ratio lies inside this particular realized interval. The interpretation also remains associational unless a separate causal design and assumptions justify a causal claim.
Estimating the Baseline Cumulative Hazard
The Cox partial likelihood estimates \(\beta\) without requiring a parametric form for \(h_0(t)\). Once \(\hat\beta\) is available, the baseline cumulative hazard can be estimated at observed event times. Let \(t_1<\cdots<t_J\) be the distinct observed event times, let \(d_j\) be the number of events at \(t_j\), and let \(R(t_j)\) be the risk set immediately before that time. The Breslow estimator adds a step at each event time.
Each increment is the event count at that time divided by the sum of the fitted relative hazards among individuals still at risk. Individuals with larger fitted relative hazards contribute more to this denominator. If there are no tied events, \(d_j=1\); when there are ties, the Breslow increment uses the full event count in the numerator and the risk-set sum in the denominator. The estimate is a step function: it increases at event times and is unchanged between them.
The Breslow baseline estimator is a plug-in estimate: it uses the fitted coefficients in the risk-set weights. Cox regression software can use different methods to handle tied event times when estimating coefficients. The particular coefficient estimate and baseline estimator should be reported clearly; the formulas below use the Breslow baseline estimate with the fitted \(\hat\beta\).
Worked Example: Calculating Baseline Survival With Tied Events
Consider hypothetical Cox-model output at three event times. The table gives the number of events and the sum of \(\exp(x_i^\top\hat\beta)\) over each risk set. Suppose the fitted model's reference profile is \(x=0\).
| Event time \(t_j\) (months) | Events \(d_j\) | Risk-set sum \(\sum_{i\in R(t_j)}\exp(x_i^\top\hat\beta)\) | Breslow increment |
|---|---|---|---|
| 2 | 2 | 10 | \(2/10=0.2000\) |
| 5 | 1 | 8 | \(1/8=0.1250\) |
| 8 | 1 | 5 | \(1/5=0.2000\) |
At month 2, two events are tied, so the estimated baseline cumulative-hazard increment is $$ \frac{d_1}{\sum_{i\in R(2)}\exp(x_i^\top\hat\beta)} =\frac{2}{10}=0.2000. $$
The cumulative estimates at months 2, 5, and 8 are, respectively, $$ \widehat H_0(2)=0.2000,\qquad \widehat H_0(5)=0.2000+0.1250=0.3250,\qquad \widehat H_0(8)=0.3250+0.2000=0.5250. $$
Thus the estimated baseline survival at month 8 is $$ \widehat S_0(8)=\exp[-0.5250]=0.5916. $$ This is the model's estimated survival for the reference covariate profile \(x=0\), not a survival estimate for every individual in the sample.
Combining the Baseline With a Covariate Profile
For a fixed covariate profile \(x\), the model implies that its cumulative hazard is the baseline cumulative hazard multiplied by \(\exp(x^\top\beta)\). Survival is the exponential of minus the cumulative hazard. These relationships give a direct route from a fitted coefficient vector and an estimated baseline to a conditional survival prediction.
For the requested profile, compute \(\hat\eta=x^\top\hat\beta\).
At prediction time \(t\), calculate \(\widehat H(t\mid x)=\widehat H_0(t)\exp(\hat\eta)\).
Calculate \(\widehat S(t\mid x)=\exp[-\widehat H(t\mid x)]\).
The calculation follows from the definition of the cumulative hazard as the integral of the hazard. For a fixed profile \(x\), \(\exp(x^\top\beta)\) is constant with respect to time, so it can be taken outside the integral. Exponentiating the negative cumulative hazard then gives the survival function.
Worked Example: Predicting Survival for Two Profiles
In a hypothetical time-to-readmission analysis, suppose the fitted model has two covariates: age measured in decades above 50, and a treatment indicator. Let their estimated coefficients be \(0.25\) and \(-0.50\), respectively. At 12 months, suppose the estimated baseline cumulative hazard is \(\widehat H_0(12)=0.3000\). Compare a 60-year-old treated patient with a 60-year-old untreated patient.
For both profiles, age is one decade above 50. For the treated patient, the treatment indicator is 1, so $$ \hat\eta_{\text{treated}}=(1)(0.25)+(1)(-0.50)=-0.25, \qquad \exp(\hat\eta_{\text{treated}})=\exp(-0.25)=0.7788. $$
The predicted cumulative hazard and survival are $$ \widehat H(12\mid \text{treated})=0.3000(0.7788)=0.2336, $$ $$ \widehat S(12\mid \text{treated})=\exp(-0.2336)=0.7917. $$
For the untreated patient, the treatment indicator is 0: $$ \hat\eta_{\text{untreated}}=(1)(0.25)+(0)(-0.50)=0.25, \qquad \exp(\hat\eta_{\text{untreated}})=\exp(0.25)=1.2840. $$
Therefore, $$ \widehat H(12\mid \text{untreated})=0.3000(1.2840)=0.3852, \qquad \widehat S(12\mid \text{untreated})=\exp(-0.3852)=0.6803. $$
Under the fitted model, the estimated 12-month survival is 0.7917 for the specified treated profile and 0.6803 for the specified untreated profile. The treatment coefficient also implies a conditional hazard ratio of \(\exp(-0.50)=0.6065\) for treated versus untreated patients of the same age. Neither the hazard ratio nor the survival difference alone establishes a causal treatment effect.
Reference Profiles, Interpretation, and Limitations
The baseline is not necessarily the hazard for an average or typical individual. It is the hazard when every modeled covariate equals zero. If age is recorded in years, for example, age zero may be an irrelevant reference. Centering age at 50 changes the profile represented by the baseline and can make its survival easier to interpret. The fitted hazard ratios for covariate contrasts remain the same when this is only a change of reference origin, but the numerical baseline hazard and baseline survival change accordingly.
Predictions should therefore state the covariate profile, the time point, and the estimated survival in context. A value such as \(\widehat S(12\mid x)=0.79\) is an estimated conditional probability of remaining event-free beyond 12 months for individuals with profile \(x\), under the fitted model and censoring assumptions. It is not an unconditional probability for the study population. A plug-in prediction also treats the fitted coefficients and baseline estimate as fixed; it does not by itself provide an uncertainty interval.
The Cox model is useful because it separates relative covariate effects from the unspecified shape of the baseline hazard. The coefficients summarize conditional relative hazards, while the baseline estimate supplies the time scale needed for absolute survival predictions. Both are needed when the question concerns survival at a specified time rather than a relative hazard comparison.
Common Mistakes
- Calling a hazard ratio a probability ratio. A hazard ratio compares instantaneous event rates among those still event-free; it is not the ratio of probabilities of experiencing the event by a fixed date.
- Reporting baseline survival without its reference profile. The baseline corresponds to \(x=0\) under the chosen coding. State what that profile represents, or explain why it is only a mathematical reference.
- Using the baseline survival for a nonbaseline profile. For \(x\ne 0\), first multiply the baseline cumulative hazard by \(\exp(x^\top\hat\beta)\), then convert to survival.
- Describing a fitted association as a causal effect. The Cox model alone does not remove confounding or justify causal language.
- Ignoring the event-time increment when events are tied. In the Breslow baseline estimate, the numerator is the number of events \(d_j\), not automatically one.
Check Your Understanding
Use the definitions and calculations in this tutorial to answer the following questions.
- A coefficient for a binary covariate is \(0.30\). What is the corresponding conditional hazard ratio, and what comparison does it describe?
- Why does the Breslow estimate use \(d_j\) in the numerator when \(d_j\) events occur at an event time?
- If \(\widehat H_0(t)=0.40\) and \(x^\top\hat\beta=\log(2)\), calculate \(\widehat H(t\mid x)\) and \(\widehat S(t\mid x)\).
- What covariate profile does baseline survival represent, and why might centering a covariate make that profile more interpretable?
- Why does a hazard ratio below one not, by itself, state the difference in survival probabilities at a fixed time?