Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • interpretation of lincom hazard ratios after Cox regression with interaction term

    Let's assume that my Cox regression model has two binary variables (coded 0/1) x1 and x2, their interaction term x1##x2, and a continuous variable x3 that has a range of 50 to 100:
    Code:
    stcox i.x1##i.x2 x3, base
    lincom 1.x1 + 1.x1#1.x2
    Is my understanding correct that the hazard ratio calculated by lincom corresponds to the x3 (continuous) variable set to 0 (zero), which is outside of the possible range? And in general, any variable not included in the -lincom- but included in the Cox model, is assumed to be 0 (zero)?

  • #2
    Is my understanding correct that the hazard ratio calculated by lincom corresponds to the x3 (continuous) variable set to 0 (zero)...
    No, that's incorrect. Your model does not include any interaction term between x3 and x1. Consequently, the hazard ratio for x1 is independent of the value of x3. In fact, by omitting any interaction between x3 and x1 from the model, you are stipulating that the hazard ratio of x1 is the same regardless of what x3 is. So the hazard ratio estimated by your -lincom- command is that of x1 conditional on x2 == 1, and applies across all values of x3 (even values that you can imagine but are impossible in the real world).

    And in general, any variable not included in the -lincom- but included in the Cox model, is assumed to be 0 (zero)?
    This more general question is a bit complicated. As pointed out in the preceding paragraph, variables that do not interact with x1 in the Cox regression do not matter in this context. But let's suppose you had a different Cox model: -stcox i.x1##(i.x2 c.x3)- that does include an x1 by x3 interaction, and then you run that same -lincom 1.x1 + 1.x1#.x2- command. What you are doing is just making an error. With this situation, the -lincom- command is trying to calculate a hazard ratio for x1 but it is ignoring the fact that the hazard ratio for x1 depends on the value of x3. In an interaction model like this there is no such thing as "the hazard ratio for x1." The results of that -lincom- command would, in fact, correspond to the hazard ratio of x1 conditional on x2 == 1 and x3 == 0. But given that x3 == 0 is not possible in the real world, it would be better to say that the result is meaningless.

    Now, you might be interested in the hazard ratio of x1, conditional on x2 = 1, but marginal across the distribution of values of x3. You can get that, but not with -lincom-. That would require you to run -margins, dydx(x1) at(x2 = 1)- instead. And if you are interested in the hazard ratio of x1, conditional on x2 = 1 and x3 = , say, 74, you would run -margins, dydx(x1) at (x2 = 1 x3 = 74)-
    Last edited by Clyde Schechter; 17 Nov 2025, 10:50.

    Comment


    • #3
      Perfect! Thank you, Clyde, for your excellent response, which clarifies the interpretation of the -lincom- output after -stcox-.

      Comment

      Working...
      X