# Stratification on a variable involved in an interaction term

**URL:** <https://discourse.datamethods.org/t/stratification-on-a-variable-involved-in-an-interaction-term/5555>\
**Category:** models\
**Tags:** survival-analysis\
**Created:** [May 3, 2022, 8:33pm UTC](https://discourse.datamethods.org/t/stratification-on-a-variable-involved-in-an-interaction-term/5555 "2022-05-03T20:33:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbulen](https://discourse.datamethods.org/letter_avatar_proxy/v4/letter/b/2acd7d/32.png) [@bbulen](https://discourse.datamethods.org/u/bbulen)\
**Post date:** [May 3, 2022, 8:33pm UTC](https://discourse.datamethods.org/t/stratification-on-a-variable-involved-in-an-interaction-term/5555/1 "2022-05-03T20:33:49Z")

</div>

I am interested in running a CPH model and looking at treatment and a biomarker score. Treatment fails the proportional hazard assumption, looking at both Schoenfeld residuals and log-log plots. I would stratify my analysis on treatment, however, I am mainly interested in the interaction between treatment and the biomarker score. I am not really sure how to or if I can interpret the interaction term if I stratify on treatment. If there is not a good interpretation for an interaction term involving a stratified variable any suggestions on a more appropriate analysis would also be helpful.

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [May 3, 2022, 9:21pm UTC](https://discourse.datamethods.org/t/stratification-on-a-variable-involved-in-an-interaction-term/5555/2 "2022-05-03T21:21:01Z")

</div>

The Cox model has an interesting feature: you can interact a non-modeled factor (stratification factor) and a modeled covariate. This will assess whether the effect of the covariate (biomarker) is modified by the strata.

---

<div class="post-metadata">

**Author:** ![bbulen](https://discourse.datamethods.org/letter_avatar_proxy/v4/letter/b/2acd7d/32.png) [@bbulen](https://discourse.datamethods.org/u/bbulen)\
**Post date:** [May 4, 2022, 1:45pm UTC](https://discourse.datamethods.org/t/stratification-on-a-variable-involved-in-an-interaction-term/5555/3 "2022-05-04T13:45:32Z")

</div>

Hi Dr. Harrell,  
Thank you for the quick response! I believe I am quite lucky to have blindly fallen on this feature as it will allow me to proceed with my analysis w/o a large strategy change.

From an implementation standpoint, should I stratify on treatment and only include treatment in the interaction term (i.e. not include treatment main effect)?

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [May 4, 2022, 4:45pm UTC](https://discourse.datamethods.org/t/stratification-on-a-variable-involved-in-an-interaction-term/5555/4 "2022-05-04T16:45:08Z")

</div>

Correct. Having treatment as a stratification factor is more general than having it as a main effect so you don’t also include the main effect term.
