It's important to recognize an important difference between hazard rates:
In survival analysis, the hazard rate at time 𝑡 is the instantaneous probability of death at 𝑡, conditional on survival until 𝑡.
and hazard ratios. A hazard rate can be thought of as defined for a group of individuals having a defined set of characteristics. A hazard ratio is then the ratio of hazard rates between 2 such groups at some point in time. So the hazard ratio depends both on the reference group and on the set of characteristics that you specify for the second group.
Although a hazard ratio can be defined at any point in time, the proportional hazards assumption underlying the Cox model is that the hazard ratio between 2 defined groups is constant regardless of the particular time point.
The way you set up your Cox model, the reference set of characteristics is Continuous_Var = 0
and Dummy_Var = 0
. All of the hazard ratios you have plotted (evidently with the simPH
package) are expressed relative to that reference. Without an interaction term the hazard ratio for a different set of characteristics, relative to that reference, would have been the product of the individual hazard ratios based on the specified values of Continuous_Var
and Dummy_Var
. With the interaction term that you included, the hazard ratio can be either greater or lower than that product, depending on whether the interaction is positive or negative.
So with respect to your questions:
Your statement that "the hazard ratio is the ratio of the hazard rates, when you increase the [continuous] variable by 1 and in Cox-regressions one normally assumes this ratio to be constant" might not take the interaction into account.* The interaction term allowed for the slope of the Hazard Ratio as a function of the value of Continuous_Var
to be different depending on the value of Dummy_Var
. It also necessarily allowed the Hazard Ratio associated with the value of Dummy_Var
to differ depending on the value of Continuous_Var
, if you prefer to think about it that way. For example, the Hazard Ratio associated with the 1-0 difference in Dummy_Var
is about 1.8 at Continuous_Var = 0
and rises to about 2.5 when Continuous_Var = 5
. So yes, including interaction terms can require a bit of extra thought with respect to interpretation. That's really no different in principle, however, from interactions in ordinary regression.
Nothing in your plot has anything to do with time per se. If the proportional hazards hypothesis holds then an individual with Continuous_Var = 5
and Dummy_Var = 1
would have at all times an instantaneous hazard 2.5 times that of an individual with Continuous_Var = 0
and Dummy_Var = 0
. To test the proportional hazards assumptions you have to look explicitly at how things change over time.
The hazard ratios are ratios, not percentages as you seem to present them in your question. Also, the use of the word "risk" can be ambiguous as it often is used to represent an absolute risk (e.g., risk of death before 3 years) rather than the instantaneous probability (conditional on survival to a particular time) of a hazard rate. So it would be better to specify "hazard" or "hazard rate" and to be clear about the reference situation if you specify a hazard ratio. Thus you could more properly say: "With respect to Dummy_Var=0
at Continuous_Var = 0
, the hazard is around 1.8 times higher with Dummy_Var=1
at Continuous_Var = 0
, increasing to a hazard ratio of 2.5 at Dummy_Var=1
and Continuous_Var = 5
." The Hazard Ratio of 2.25 plotted for Dummy_Var=1
at Continuous_Var = 3
represents the hazard relative to the reference condition, Dummy_Var=0
at Continuous_Var = 0
. You could calculate the Hazard Ratio between Continuous_Var = 3
and Continuous_Var = 2
at Dummy_Var=1
from your plot, as both use Dummy_Var=0
at Continuous_Var = 0
as the reference; looks like it would be about 2.25/2.1 or about 1.07.
*One more warning: the Cox model assumes that hazards change exponentially with the value of a continuous predictor variable. That's why there's a slight curve visible in the blue line on your plot; it probably would have shown up on the red line, too, if you magnified that part of the curve enough. That might also be contributing to some confusion. Working in the log-hazard scale can sometimes help clarify things, where additive effects of predictors remain additive instead of multiplicative as on your plot.