Tutorials › Competing Risks and Multi-State Models › Covariate-by-Transition Interactions

Regression for Multi-State Data · Tutorial 357 of 699

Covariate-by-Transition Interactions

You will learn how to construct and interpret a transition-interaction model in which each coefficient is either a reference-transition effect or a deviation from it.

Advanced 12 min read

What You'll Learn

  • Write a transition-stratified proportional-hazards model with covariate-by-transition interactions.
  • Interpret reference-transition coefficients, interaction coefficients, and combined effects.
  • Calculate hazard ratios and uncertainty for a transition-specific effect.
  • Understand how changing the reference transition changes coefficient labels but not fitted effects.
  • Recognize model assumptions, diagnostics, and the trade-offs against shared or fully separate effects.

Why Interact Covariates With Transition?

A covariate need not have the same association with every transition in a multi-state process. For example, a treatment may be associated with a different transition rate from the initial state to recovery than with the rate from the initial state to a complication. A single shared coefficient rules out this variation; fitting a completely separate model for every transition can make comparisons awkward and use many parameters. A covariate-by-transition interaction offers a direct way to represent transition-specific effects while expressing them as a reference effect plus deviations.

The model below is a transition-stratified proportional-hazards model. Transition-specific baseline hazards allow the underlying transition rates to differ freely. The interaction terms describe how the covariate associations differ across transitions. The focus is on interpreting and constructing those terms, rather than on re-deriving transition-specific partial likelihood.

Definition: Let \(k=1,\ldots,K\) index allowed transitions, and let \(x=(x_1,\ldots,x_p)\) be a vector of covariates. Choose transition 1 as the reference. A transition-interaction proportional-hazards model is $$ \lambda_k(t\mid x)=\lambda_{0k}(t)\exp\left\{\sum_{j=1}^{p}x_j(\beta_j+\gamma_{jk})\right\}, \qquad \gamma_{j1}=0. $$ Here \(\lambda_k(t\mid x)\) is the transition-specific intensity at time \(t\), and \(\lambda_{0k}(t)\) is a transition-specific baseline intensity. For covariate \(x_j\), \(\beta_j\) is its log-hazard ratio in the reference transition; \(\gamma_{jk}\) is the difference in its log-hazard ratio between transition \(k\) and the reference.

The constraint \(\gamma_{j1}=0\) is the reference-coding convention: the reference transition has no deviation term. For a covariate that is assumed to have a shared effect, its deviation terms are instead constrained to zero for all transitions. Thus, a model may include interactions for selected covariates only.

For a one-unit increase in \(x_j\), holding other covariates fixed, the hazard ratio for transition \(k\) is \(\exp(\beta_j+\gamma_{jk})\). The interaction coefficient alone has a different interpretation: \(\exp(\gamma_{jk})\) is the ratio of that hazard ratio in transition \(k\) to the hazard ratio in the reference transition. It is not, by itself, the hazard ratio for transition \(k\).

How the Reference and Deviation Coefficients Arise

A transition indicator makes the coding explicit. Let \(I(k=r)\) equal 1 when an observation concerns transition \(r\), and 0 otherwise. For one covariate \(x\), a reference-coded linear predictor can be written \(\eta_k=x\beta+\sum_{r=2}^{K}x\gamma_r I(k=r)\). For the reference transition, all indicators in the sum equal zero, so \(\eta_1=x\beta\). For any other transition \(k\), its own indicator contributes \(x\gamma_k\), giving \(\eta_k=x(\beta+\gamma_k)\). This is why the reference coefficient is the reference effect and the interaction coefficient is a deviation.

The transition-specific baseline \(\lambda_{0k}(t)\) is important to this interpretation. It allows transitions to have different baseline intensity patterns without requiring a transition main-effect coefficient in the linear predictor. In a stratified model, a constant transition indicator is absorbed by the transition-specific baseline; the covariate-by-transition term remains informative because it describes how the covariate association changes across transitions.

Worked Example: Reading Reference and Deviation Effects

Suppose a hypothetical study models three transitions: \(A\to B\) (the reference), \(A\to C\), and \(B\to C\). Treatment is coded \(x=1\) for treated and \(x=0\) for untreated. The fitted treatment coefficient is \(\hat{\beta}=0.40\), and the interaction deviations are \(\hat{\gamma}_{A\to C}=-0.55\) and \(\hat{\gamma}_{B\to C}=0.20\). Assume the transition-specific proportional-hazards model is appropriate.

For \(A\to B\), the log hazard ratio is \(0.40\), so the treatment hazard ratio is \(\exp(0.40)=1.492\). In this hypothetical model, treatment is associated with an estimated 1.492-fold transition intensity for \(A\to B\), conditional on the other modeled covariates.

For \(A\to C\), the log hazard ratio is \(0.40-0.55=-0.15\), giving \(\exp(-0.15)=0.8607\). For \(B\to C\), it is \(0.40+0.20=0.60\), giving \(\exp(0.60)=1.822\). The estimated treatment hazard ratios therefore differ by transition.

The \(A\to C\) interaction itself is interpreted through \(\exp(-0.55)=0.5769\): the estimated treatment hazard ratio for \(A\to C\) is 0.5769 times the treatment hazard ratio for the reference transition \(A\to B\). This comparison of hazard ratios is not the same as comparing the absolute transition intensities, which also depend on the transition-specific baseline intensities.

Uncertainty for a Transition-Specific Effect

A transition-specific log hazard ratio is a sum of coefficients, so its uncertainty must account for their covariance. For a single covariate and transition \(k\ne1\), \(\widehat{\theta}_k=\hat{\beta}+\hat{\gamma}_k\), and \(\operatorname{Var}(\widehat{\theta}_k)=\operatorname{Var}(\hat{\beta})+\operatorname{Var}(\hat{\gamma}_k)+2\operatorname{Cov}(\hat{\beta},\hat{\gamma}_k)\). A confidence interval for the log hazard ratio can then be exponentiated to obtain an interval for the hazard ratio. Using only the standard error of the interaction coefficient would quantify uncertainty in the deviation, not uncertainty in the transition-specific effect.

Worked Example: A Confidence Interval for a Transition Effect

Continue the hypothetical model above. Suppose the estimated standard errors are \(SE(\hat{\beta})=0.18\) and \(SE(\hat{\gamma}_{A\to C})=0.22\), and their estimated covariance is \(-0.012\). These are hypothetical estimates from a fitted model. Assume the usual large-sample normal approximation for the coefficient estimates is reasonable.

The estimated log hazard ratio for treatment on \(A\to C\) is \(-0.15\). Its estimated variance is \(0.18^2+0.22^2+2(-0.012)=0.0324+0.0484-0.0240=0.0568\), so its standard error is \(\sqrt{0.0568}=0.2383\).

A 95% Wald interval on the log scale is \(-0.15\pm1.96(0.2383)=[-0.6171,0.3171]\). Exponentiating both endpoints gives \([\exp(-0.6171),\exp(0.3171)]=[0.5395,1.373]\). Thus, under the model and approximation, the interval is compatible with treatment hazard ratios for \(A\to C\) ranging from about 0.540 to 1.37, conditional on the modeled covariates. Since the interval includes 1, it does not establish a non-null association at the 5% two-sided level.

For comparison, the interaction deviation itself has standard error 0.22. Its 95% Wald interval is \(-0.55\pm1.96(0.22)=[-0.9812,-0.1188]\), or \([0.3749,0.888]\) after exponentiation. This interval concerns the ratio of hazard ratios between \(A\to C\) and \(A\to B\), not the treatment hazard ratio for \(A\to C\).

Reference Choice and Model Comparisons

The reference transition determines which coefficient is called the common reference effect. Changing that choice changes the numerical values and labels of the coefficients, but not the fitted transition-specific effects. To see this, let two transitions have log hazard ratios \(\theta_1=0.30\) and \(\theta_2=-0.20\). With transition 1 as reference, \(\beta=0.30\) and \(\gamma_2=-0.50\), since \(\theta_2=\beta+\gamma_2\). If transition 2 becomes the reference, the new reference coefficient is \(\beta'=-0.20\), and the deviation for transition 1 is \(\gamma'_1=0.50\). The effects remain \(0.30\) and \(-0.20\).

A shared-effect model imposes \(\gamma_{jk}=0\) for the transitions being compared. A model with unrestricted transition-specific effects estimates a separate coefficient for each covariate and transition. The interaction parameterization makes the same kinds of effects easy to express as reference effects and contrasts. Which model is useful depends on the scientific question, the amount of information in each transition risk set, and whether transition-specific differences are a central target. Formal tests of shared versus heterogeneous effects are a separate inferential task; the coefficient coding alone does not establish that an interaction is needed.

Worked Example: Combining Two Covariates on One Transition

Consider a hypothetical model with treatment \(x_1\) and age \(x_2\), where age is measured in units of 10 years. Let transition 1 be the reference, with \(\hat{\beta}_1=0.25\) for treatment and \(\hat{\beta}_2=0.10\) for age. For transition 2, let the deviations be \(\hat{\gamma}_{1,2}=-0.40\) and \(\hat{\gamma}_{2,2}=0.05\). Assume the model includes no treatment-by-age interaction beyond these covariate-by-transition terms.

For transition 2, the treatment log hazard ratio per treated versus untreated is \(0.25-0.40=-0.15\). The age log hazard ratio per 10-year increase is \(0.10+0.05=0.15\). Compare two otherwise identical profiles in transition 2: one is treated and 20 years older, so \(x_1=1\) and \(x_2=2\) relative to the comparison profile. Their linear-predictor difference is \((-0.15)(1)+(0.15)(2)=0.15\). The corresponding hazard ratio is \(\exp(0.15)=1.162\). This calculation combines covariate contributions on the log-intensity scale; it does not compare baseline intensities across transitions.

Assumptions, Diagnostics, and Failure Modes

Interpretation depends on the model being appropriate for the data and target. The main assumptions and checks include:

  • Proportional hazards within each transition. For fixed covariates, each transition’s covariate effect is constant over the modeled time scale. The baseline intensity may vary with time and differ across transitions, but a covariate-by-transition interaction alone does not permit its effect to vary over time.
  • Correct transition and risk-set construction. Events must be assigned to the appropriate allowed transition, and individuals must contribute to the risk sets when they are actually at risk for that transition.
  • Appropriate censoring and dependence handling. Standard hazard-model inference requires censoring to be non-informative conditional on the modeled information. If individuals contribute multiple transitions, observations from the same individual may be dependent; variance estimation should reflect that dependence when required by the design and fitting method.
  • Adequate information for each transition. Interaction estimates can be unstable when few events occur in a transition or when covariate values have little overlap in its risk set. Large standard errors, convergence warnings, or extreme estimates are reasons to investigate sparse data or separation-like behavior.

Check whether the fitted transition-specific effects are plausible and whether the proportional-hazards assumption is tenable for each transition. A clear time pattern in residual-based checks or estimated effects suggests that a constant transition-specific coefficient may be inadequate; adding a transition interaction does not repair time-varying effects. Also inspect covariate coding, units, and the reference transition. An age coefficient per year and one per decade differ by a factor of ten on the log scale, so unscaled coefficients can be misread even when the fitted model is correct.

Common mistake: “The interaction coefficient is the hazard ratio for that transition.” This is wrong because the interaction is a log-scale deviation from the reference effect. For transition \(k\), first add \(\hat{\beta}_j+\hat{\gamma}_{jk}\), then exponentiate to obtain its hazard ratio. Exponentiating the interaction alone gives the ratio of that transition’s hazard ratio to the reference transition’s hazard ratio.

The model also has limitations. A reference transition is a coding choice, not a scientifically privileged transition, and a different choice may make coefficients easier to communicate. With many covariates and transitions, a large set of interaction terms can overfit, particularly when some transitions are rare. Conversely, imposing shared effects may conceal real heterogeneity. Neither coding nor model fit makes an observational association causal; causal interpretation requires additional design and identification assumptions. Transition interactions also do not by themselves model effects that depend on the state history, nor do they make covariate effects time-varying.

1
Choose a reference transition.
Use the transition that makes the reference effects easiest to interpret, and state the choice explicitly.
2
Specify which covariates vary by transition.
Include interaction deviations for those covariates; constrain deviations to zero where a shared effect is intended.
3
Interpret effects on the right scale.
Add the reference coefficient and the relevant deviation to obtain the transition-specific log hazard ratio, then exponentiate.
4
Check assumptions and uncertainty.
Assess transition-specific proportionality, risk-set construction, information, and dependence; use coefficient covariances for intervals of sums.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. With transition 1 as reference, a covariate has \(\hat{\beta}=0.20\) and \(\hat{\gamma}_3=-0.50\). What is the hazard ratio for transition 3, and what does \(\exp(\hat{\gamma}_3)\) represent?
  2. If transition 2 is reselected as the reference, must the fitted hazard ratios change? Explain briefly.
  3. For a non-reference transition, why is the variance of \(\hat{\beta}+\hat{\gamma}_k\) not generally the sum of the two variances alone?
  4. A transition interaction is included, but the covariate effect changes over time within that transition. Does the interaction solve this problem? Why or why not?

Solutions. (1) The transition-3 log hazard ratio is \(0.20-0.50=-0.30\), so its hazard ratio is \(\exp(-0.30)=0.7408\). The interaction ratio is \(\exp(-0.50)=0.6065\), the ratio of the transition-3 hazard ratio to the reference-transition hazard ratio. (2) No. Reparameterization changes which coefficient is the reference and how deviations are represented, but leaves each transition’s fitted effect unchanged. (3) The estimates may be correlated, so the variance includes \(2\operatorname{Cov}(\hat{\beta},\hat{\gamma}_k)\). (4) No. The interaction allows the effect to differ across transitions but remains constant over time within each transition; a time-varying effect requires a different model specification.

Clinical Biostats