# Interpreting interaction effect with ln(time) in Cox regression

I am fitting a Cox proportional hazards model with the interaction effect dummy:ln(time). How would you interpret the result? Is it a simple exp(x)-1)*100 to receive the percentage increase in y?

Edit: I indeed made the mistake @EdM mentioned. This interaction is now set up according to Therneau et al. (2022, pp. 21). I originally wanted to replicate the following model of Schmitt et al. (2011):

In their results, the interaction term was not significant. I added stratification to increase the efficiency of the model. mgm_acquired is a time-invariant binary variable. The result now looks the following:

Call:
coxph(formula = Surv(time, status) ~ mgm_acquired + tt(mgm_acquired) +
strata(most_frequent_community) + strata(age_group) + strata(reg_month) +
strata(cluster), data = RG, tt = function(x, t, ...) x *
log(t))

n= 119130, number of events= 71720

coef exp(coef)  se(coef)      z Pr(>|z|)
mgm_acquired     -0.179475  0.835709  0.047095 -3.811 0.000138 ***
tt(mgm_acquired)  0.011930  1.012002  0.009219  1.294 0.195648
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

exp(coef) exp(-coef) lower .95 upper .95
mgm_acquired        0.8357     1.1966    0.7620    0.9165
tt(mgm_acquired)    1.0120     0.9881    0.9939    1.0305

Concordance= 0.503  (se = 0 )
Likelihood ratio test= 46.1  on 2 df,   p=1e-10
Wald test            = 44.28  on 2 df,   p=2e-10
Score (logrank) test = 44.35  on 2 df,   p=2e-10


Four questions emerged in my head:

1. Is this more realistic now?
2. How do I interpret the new coefficient of mgm_acquired?
3. How to interpret the interaction effect? Does the absolute value of the coeffcient tell me something?
4. Why did Therneau add log(t+20) "to make the first 200 days of the plot roughly linear"? What is the point of the 20?

Thanks!

• Please edit the question to show the details of how your data were set up and how you included that interaction term. As Section 4.2 of the R time-dependence vignette explains, one common way that people try to do that leads an error. Unless this regression is set up properly, there might be no useful way to interpret your interaction term. Please provide that information by editing the question, as comments are easy to overlook and can be deleted.
– EdM
Commented May 23, 2022 at 12:45
• Hey @EdM - thank you. I edited the question accordingly. Is the given information enough or did I miss anything important? Commented May 23, 2022 at 13:09

Although the large number of cases makes most of your coefficients "statistically significant," your model is not distinguishing cases very successfully.

The concordance of 0.503 is the fraction of comparable pairs of cases in which the observed and predicted event order agreed. That's barely better than a chance value of 0.500. It's not clear whether all of the stratification you used in the model was necessary or even helpful. For your first question, you must decide if that model and its result is "realistic" based on your understanding of the subject matter.

For the second and third questions, following the example in Section 4.2 of the time dependence vignette, the full mgm_acquired coefficient is $$-0.179475 + 0.011930 \log t$$. That total association of mgm_acquired with the log-hazard of your event is what you need to focus on.

For example, the value displayed for mgm_acquired itself is for the specific situation $$\log t = 0$$ or $$t=1$$. The value of what you call the "interaction effect" (the tt() coefficient) shows how much a change of one log unit in t changes the contribution of mgm_acquired to the log hazard.

Despite the very large number of cases, the time-transformed part of the mgm_acquired coefficient isn't significantly different from 0. So it's hard to argue that there's any substantial time-varying part of the coefficient for mgm_acquired.

• For the last part of the question, the +20 in log(t+20) for the time transform was an attempt to match a pattern seen in the data.
– EdM
Commented May 23, 2022 at 19:40
• Thanks a lot @EdM - that is very helpful. Commented May 24, 2022 at 7:39
• I wonder why there is not a proper overview on this somewhere on the internet. I used the stratification, as tt() including all covariates gives an error message that the vector limit is reached. As you can see, I control for every month of registration and also the age groups - some of them pass the Schoenfeld test, some don't (let's say June passes, while July doesn't). Would you then strictly stratify every significant variable (the result table then shows a very fragmented view of ages and months)? Commented May 24, 2022 at 7:40
• @Rnoob with a study this large you are almost certain to get a "statistically significant" violation of proportional hazards (PH). See this page, for example. Then you have to inspect the results (e.g., with a smoothed plot of scaled Schoenfeld residuals) and apply your knowledge of the subject matter to determine whether the violation is large enough to matter. Omitted or poorly modeled covariates also can lead to apparent PH violations, better handled by improving those parts of the model.
– EdM
Commented May 24, 2022 at 15:38
• @Rnoob as an example that might improve your model and perhaps lessen the PH violation, instead of modeling age_group you could model age flexibly as a continuous predictor with a regression spline. For evaluating the model, search for goodness of fit cox model on this site. With a large study like yours, you could do a train/test split and evaluate the performance of a model developed on 90,000 cases against the remaining 29000+. Bootstrap validation/calibration can be used instead, and is a better choice for smaller studies.
– EdM
Commented May 24, 2022 at 15:50