Survival › Time-to-event

Cox PH with time interaction

Cox PH regression with a tt() interaction lets a covariate's effect change as a function of time — both a diagnostic for, and a remedy against, proportional-hazards violations.

What is Cox PH with time interaction?

If Schoenfeld residuals suggest a covariate's effect drifts with time (HR not constant), you can model that drift directly via a tt() term: β(t) = β + γ·f(t) for some transform of time (log, linear). The interaction coefficient γ measures the time-trend.

Different from coxph_tv: tt() lets β change with time even though the covariate is fixed at baseline. tv lets the covariate itself change.

When should I use Cox PH with time interaction?

  • After Schoenfeld test flags PH violation for a specific covariate.
  • When you expect the effect to decay or grow with time on biological grounds.

What data does it need?

Time + event + predictors + time transform (log / linear).

What does it report?

Coefficients for the time-constant β and time-interaction γ per predictor.

How do I interpret the result?

A significant γ confirms the PH violation and quantifies the time-trend; report β at multiple landmark times rather than as a single HR.

See also