In the R code below, binary_variable_2 has two levels (e.g. "a" and "b").

The code outputs only one HR for binary_variable_1. Is this HR a combination of two HRs (i.e. one from each strata of binary_variable_2) or something else? If it is a combination, how are the strata specific HRs combined (in simple terms)? If it is something else, what is it?


A Cox model with a covariate $X$ is defined as $$ \lambda(t \mid X) = \lambda_0(t) \exp \left( \beta X \right) $$

where $\lambda_0(t)$ is the baseline risk and $e^\beta$ is the hazard-ratio.

A Cox model stratified upon a categorical variable $Y$ with $k$ modalities is a Cox model where a different baseline risk is used for each group:

$$ \lambda_k(t \mid X) :=\lambda(t \mid X, Y=k) = \lambda_{0k}(t) \exp(\beta X) $$

The assumption is that the effect of $X$ (the hazard-ratio) is same across each group but the baseline risks are different between those groups.

For example say $X$ is a binary treatment and $Y$ is also binary and encodes the age ($\geq 50$ vs $<50$).

Then the model assume that:

  • the effect of the treatment is the same no matter if the patient is older than 50 or not.
  • the baseline risk of getting an event is different between the two groups (e.g. people older than 50 have a higher risk)

Note that a stratified Cox model is different than a model where each group have its own hazard-ratio:

$$ \lambda(t \mid X, Y=k) = \lambda_{0}(t) \exp(\beta_k X) $$

because then since $\beta_k= \beta_j + \beta_k - \beta_j$

\begin{align*} \lambda(t \mid X, Y=k)&=\lambda_0(t)\exp(\beta_j)\exp(\beta_k-\beta_j) \\ &= \lambda(t \mid X, Y=j)\exp(\beta_k-\beta_j) \end{align*}

Thus the risks between two groups, $$\frac{ \lambda(t \mid X, Y=k)}{ \lambda(t \mid X, Y=j)}=\exp(\beta_k-\beta_j) $$ will be proportional, which may not be the case with the stratified Cox model since the baseline risks $\lambda_{0k}(t)$ and $\lambda_{0j}(t)$ are not assumed to have any particular proportional relashionship.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.