# Interpreting HRs from stratified cox survival analysis in R

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?

coxph(Surv(time_to,event)~binary_variable_1+strata(binary_variable_2),data=dat)


Cross Validated Asked on November 12, 2021

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.

Answered by periwinkle on November 12, 2021

## Related Questions

### Standard Error or Standard Deviation for error associated with averaging raster values within a polygon?

0  Asked on December 28, 2020 by jbukoski

### Is it possible to interchange the quantile operator and a measurable monotone function? $Q_theta(f(X)) = f(Q_theta(X))$

3  Asked on December 27, 2020

### ROC Curve for data sets with large negative bias

0  Asked on December 27, 2020 by malek

### How to apply distance-based clustering or dimensionality reduction for too many samples

1  Asked on December 27, 2020 by matin-kh

### Understanding multiple regression coefficients and calculations

2  Asked on December 27, 2020 by p34y2

### Arima model giving high forecast values

1  Asked on December 27, 2020

### How to numerically solve for a variant of the weighted least squares

0  Asked on December 27, 2020 by namelessgods

### Changing representation in deep neural network

1  Asked on December 26, 2020

### CNN: Details of Zeiler Fergus Net

1  Asked on December 26, 2020 by vrx

### Chi-squared test, Poisson distribution, type I error overestimated – well-suited test for discrete distributions?

0  Asked on December 25, 2020 by slava-kohut

### Interpreting hamming loss for multilabel classification

1  Asked on December 24, 2020

### Books on using SAS to analyze market risk

1  Asked on December 24, 2020 by victor

### Is the product of conditional posterior equal to the joint distribution?

0  Asked on December 24, 2020 by calveeen

### Probability of intersection involving a continuum

0  Asked on December 24, 2020 by kacem-abd-el-aziz

### same cdf equals same expectation?

1  Asked on December 24, 2020 by natalia

### How to best represent missing count data?

0  Asked on December 23, 2020 by meilton

### Can we estimate the mean of an asymmetric distribution in an unbiased and robust manner?

2  Asked on December 21, 2020

### Choice between static and dynamic panel regression

2  Asked on December 21, 2020 by uzbekistan

### Are there realistic/relevant use-cases for one way ANOVA?

2  Asked on December 20, 2020 by david-ernst

### Help with name of a regression

0  Asked on December 19, 2020 by user276835