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

1 AnswersA 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

0 Asked on December 28, 2020 by jbukoski

3 Asked on December 27, 2020

mathematical statistics measure theory quantiles random variable

0 Asked on December 27, 2020 by malek

confusion matrix precision recall python roc unbalanced classes

1 Asked on December 27, 2020 by matin-kh

2 Asked on December 27, 2020 by p34y2

0 Asked on December 27, 2020 by namelessgods

1 Asked on December 26, 2020

0 Asked on December 25, 2020 by slava-kohut

chi squared goodness of fit poisson distribution statistical test

1 Asked on December 24, 2020

1 Asked on December 24, 2020 by victor

0 Asked on December 24, 2020 by calveeen

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

conditional probability continuous data distributions measure theory probability

1 Asked on December 24, 2020 by natalia

0 Asked on December 23, 2020 by meilton

2 Asked on December 21, 2020

2 Asked on December 21, 2020 by uzbekistan

dynamic regression fixed effects model generalized moments panel data random effects model

2 Asked on December 20, 2020 by david-ernst

anova experiment design multiple comparisons post hoc statistical power

0 Asked on December 19, 2020 by user276835

conditional probability machine learning mathematical statistics nested data regression

Get help from others!

Recent Answers

- isherwood on Securing heavy steel shelving unit (sitting on floor) to walls (earthquake prep)
- CW Dillon on Exporting attribute table to Excel from QGIS?
- ThomasG77 on Exporting attribute table to Excel from QGIS?
- BERA on Exporting attribute table to Excel from QGIS?
- HaraldVTN on Exporting attribute table to Excel from QGIS?

Recent Questions

- Securing heavy steel shelving unit (sitting on floor) to walls (earthquake prep)
- Exporting attribute table to Excel from QGIS?
- Multiplying rasters by integers in processing modeler
- Deleting values less than 0.31 in NDVI raster layer in QGIS
- Interactively Display Values of a Heatmap.js leaflet.js Heatmap Layer

© 2021 InsideDarkWeb.com. All rights reserved.