# Interpretation of interaction between covariates and time in cox regression

If I have a categorial variable (let's say $X$) and a continuos variable (let's say $Y$). IF I fitted a standard cox model, it will result in a violation of the constant HR over time (based of Schoenfeld residuals). So, I fitted again with interaction (with time). In R, this can be written as $$Surv(start,stop,event) = X + Y + X:stop + Y:stop$$

And, the interaction time is significant for both variables. My question is, how to correctly interpret this ? Is it correct to say that the hazard ratio of $X$ and $Y$ is increasing (or decreasing) with time ? Since the interaction is significant...

• If $\beta_X < 0$ and $\beta_{X:stop} < 0$ or $\beta_X > 0$ and $\beta_{X:stop} > 0$ then the difference increases over time.
• If $\beta_X > 0$ and $\beta_{X:stop} < 0$ or $\beta_X < 0$ and $\beta_{X:stop} > 0$ then the difference is diminishing until the time point $\beta_X = Time*\beta_{X:stop}$ where the risks start to differ.
An important issue is that you are all the time assuming linearity with this construction. You should also check if there is a non-linear relationship for the time interaction. I use this together with the contrast function in the rms package in order to visualize this effect. I