Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Interactions for Patient-Specific Landmark Risk

Landmarking as an Alternative · Tutorial 635 of 697

Interactions for Patient-Specific Landmark Risk

Build and interpret landmark risk models with biomarker interactions, translating model coefficients into subgroup-specific odds ratios and predicted risks.

Intermediate 11 min read

What You'll Learn

  • Specify a fixed-horizon landmark model with a biomarker-by-covariate interaction
  • Interpret interaction coefficients as differences in biomarker associations on the log-odds scale
  • Calculate and compare predicted risks across biomarker values and patient subgroups
  • Distinguish an interaction on the odds scale from variation in absolute risk
  • Assess uncertainty, model adequacy, and common pitfalls in subgroup interpretations

Why Include an Interaction?

A biomarker may carry different prognostic information for different patients. For example, the association between a biomarker measured at a landmark and the probability of an event over the next year might differ by treatment group or by another patient characteristic. A model without an interaction imposes the same biomarker association across those groups. An interaction allows that association to vary.

Here the focus is a fixed-horizon landmark risk model. The analysis population consists of patients who are eligible and event-free at landmark time \(t_0\). Let \(Y_i(\tau)\) indicate whether patient \(i\) experiences the event of interest during the interval from \(t_0\) to \(t_0+\tau\), where \(\tau\) is the prediction horizon. Let \(X_i\) be the biomarker value, expressed in a chosen unit, and let \(G_i\) be a binary patient characteristic coded 0 or 1. The model describes risk conditional on being in the landmark population and on the included predictors; it does not by itself establish a causal effect.

Definition: A biomarker-by-covariate interaction allows the biomarker coefficient to depend on a covariate. In a logistic landmark model with a binary covariate \(G_i\), this is represented by the product \(X_iG_i\). Its coefficient describes how the biomarker’s log-odds association differs between \(G_i=1\) and \(G_i=0\).

A fixed-horizon logistic model can be written as

$$ \operatorname{logit}\{P(Y_i(\tau)=1\mid X_i,G_i,\mathbf{Z}_i,\ i\text{ eligible at }t_0)\} =\beta_0+\beta_1X_i+\beta_2G_i+\beta_3X_iG_i+\boldsymbol{\gamma}^{\mathsf T}\mathbf{Z}_i . $$

Here \(\operatorname{logit}(p)=\log\{p/(1-p)\}\), and \(\mathbf{Z}_i\) contains any other covariates in the model. The probability is the patient’s modeled risk over the specified horizon. The coefficient \(\beta_3\) is the interaction coefficient. When \(G_i=0\), the biomarker slope on the log-odds scale is \(\beta_1\); when \(G_i=1\), it is \(\beta_1+\beta_3\). Thus \(\beta_3\) is a difference between slopes, not the biomarker slope for either group by itself.

Assumptions and Meaning of the Model

The model requires a clearly defined landmark cohort, a specified horizon, and a consistently defined event outcome. For ordinary logistic regression on \(Y_i(\tau)\), each patient’s outcome must be ascertainable through the horizon, or the analysis must use a suitable method that accounts for censoring before the horizon. Simply treating a patient censored before \(t_0+\tau\) as event-free can misclassify the outcome. The model also assumes independent patient-level observations, a correctly specified conditional mean structure, and adequate information to estimate the coefficients. If patients are clustered, or if the landmark data contain repeated records per patient, the analysis must account for that dependence.

The linear predictor is assumed linear in the included terms. If the biomarker association is nonlinear, a linear interaction may not be enough; the nonlinear biomarker representation established in the earlier material on nonlinear biomarker effects should be retained and, where appropriate, interacted with the covariate. Coding and units matter: \(\beta_1\) is the biomarker association when \(G=0\), and its numerical interpretation depends on the unit used for \(X\). Centering a biomarker changes the interpretation of the main effect for \(G\), but not the fitted predictions when the model is reparameterized consistently.

Deriving the Subgroup Associations

The interaction’s meaning follows directly by substituting each group value into the model. Hold the other covariates fixed. For \(G=0\), the linear predictor involving \(X\) is \(\beta_0+\beta_1X\). For \(G=1\), it is \((\beta_0+\beta_2)+(\beta_1+\beta_3)X\). Therefore, a one-unit increase in \(X\) changes the log odds by \(\beta_1\) in group 0 and by \(\beta_1+\beta_3\) in group 1. Exponentiating gives the corresponding odds ratios.

$$ \begin{aligned} \text{OR per unit }X\text{ in group }0 &= \exp(\beta_1),\\ \text{OR per unit }X\text{ in group }1 &= \exp(\beta_1+\beta_3),\\ \frac{\text{OR in group }1}{\text{OR in group }0} &= \exp(\beta_3). \end{aligned} $$

The third expression is the ratio of the two biomarker odds ratios. It is not a ratio of risks. Logistic models are nonlinear when converted to probabilities, so a constant log-odds slope does not imply a constant absolute risk difference across patients.

Worked Example: Interpreting the Interaction Coefficient

Suppose a hypothetical landmark analysis models 1-year event risk using \(X\), the biomarker level in units of 10 units above a reference value, and \(G\), an indicator for a patient subgroup. The estimated coefficients are \(\hat\beta_1=0.80\) and \(\hat\beta_3=-0.60\). Interpret the biomarker association in each subgroup.

For \(G=0\), the estimated log-odds slope per 10-unit increase in the biomarker is \(0.80\). The corresponding odds ratio is

$$ \exp(0.80)=2.226. $$

Thus, holding other model terms fixed, a 10-unit increase is associated with 2.226 times the odds of the event over 1 year in subgroup 0.

For \(G=1\), the slope is \(0.80-0.60=0.20\), so the odds ratio is

$$ \exp(0.20)=1.221. $$

The ratio of the two subgroup odds ratios is \(\exp(-0.60)=0.5488\). In this fitted model, the biomarker odds ratio per 10 units is smaller in subgroup 1 than in subgroup 0. This is an association on the odds scale, adjusted for the other included model terms; it is not evidence that changing the biomarker would cause a change in risk.

Use Predicted Risks to Show the Difference

Subgroup-specific predicted risks make the model’s implications easier to communicate in context. For the binary covariate model, first calculate the linear predictor for the patient profile, then apply the inverse-logit transformation \(p=1/\{1+\exp(-\eta)\}\). Predictions should use the same values for other covariates when the goal is to compare only \(X\) and \(G\).

Worked Example: Comparing Predicted Risks Across Subgroups

Consider the hypothetical fitted model

$$ \operatorname{logit}(p)=-2.00+0.80X+0.50G-0.60XG, $$

where \(X\) is the biomarker level in 10-unit increments above its reference and \(G=0\) or \(1\). Calculate predicted risks for \(X=-1,0,1\) in both subgroups.

For \(G=0\), the predictor is \(\eta=-2.00+0.80X\). At \(X=-1\), \(\eta=-2.80\), giving \(p=1/(1+\exp(2.80))=0.0573\). At \(X=0\), \(p=1/(1+\exp(2.00))=0.1192\). At \(X=1\), \(\eta=-1.20\), giving \(p=1/(1+\exp(1.20))=0.2315\).

For \(G=1\), the predictor is \(\eta=-2.00+0.50+(0.80-0.60)X=-1.50+0.20X\). At \(X=-1\), \(\eta=-1.70\), giving \(p=1/(1+\exp(1.70))=0.1545\). At \(X=0\), \(p=1/(1+\exp(1.50))=0.1824\). At \(X=1\), \(\eta=-1.30\), giving \(p=1/(1+\exp(1.30))=0.2142\).

Biomarker value \(X\)Predicted 1-year risk, \(G=0\)Predicted 1-year risk, \(G=1\)
-10.05730.1545
00.11920.1824
10.23150.2142

Across the displayed values, the predicted risk rises more sharply with \(X\) in subgroup 0 than in subgroup 1. The subgroup with higher risk is not the same at every biomarker value: at \(X=-1\), the prediction is higher for \(G=1\), while at \(X=1\) it is slightly higher for \(G=0\). These are model-based risks for the specified hypothetical profiles, not observed frequencies or universal subgroup averages.

A useful additional quantity is a risk difference between two biomarker values within a subgroup. In subgroup 0, the predicted change from \(X=-1\) to \(X=1\) is \(0.2315-0.0573=0.1742\), or 17.42 percentage points. In subgroup 1, it is \(0.2142-0.1545=0.0597\), or 5.97 percentage points. These risk differences summarize the fitted predictions at those particular values; they are not constant effects implied by the logistic model.

Testing and Quantifying Uncertainty

A formal test of whether the biomarker association differs by \(G\) is a test of \(H_0:\beta_3=0\). A Wald test divides the estimated interaction coefficient by its standard error and compares the result with a standard normal reference distribution in a sufficiently large sample. A confidence interval for \(\beta_3\), or for \(\exp(\beta_3)\), conveys the estimated magnitude and precision. Because subgroup slopes involve combinations of coefficients, uncertainty for \(\beta_1+\beta_3\) must use their covariance as well as their individual standard errors.

Worked Example: Testing and Interpreting an Interaction

In a hypothetical fitted model, the biomarker-by-subgroup coefficient is \(\hat\beta_3=0.45\), with \(SE=0.20\). Use a two-sided Wald test at \(\alpha=0.05\), and calculate a 95% confidence interval.

The test statistic is \(z=0.45/0.20=2.25\). The two-sided p-value is approximately \(0.0244\), which is below \(0.05\); the data provide evidence against \(H_0:\beta_3=0\) under the model assumptions. The 95% interval on the coefficient scale is

$$ 0.45\mathbin{\pm}1.96(0.20) =0.45\mathbin{\pm}0.392 =(0.058,\ 0.842). $$

Exponentiating the estimate gives \(\exp(0.45)=1.568\), and exponentiating the interval gives approximately \((1.060,2.321)\). The fitted biomarker odds ratio in subgroup 1 is estimated to be 1.568 times the corresponding odds ratio in subgroup 0 per one-unit increase in \(X\). The interval describes uncertainty in that ratio under the model; it is not a 95% probability statement about the fixed parameter.

A small p-value does not measure clinical importance, and a large p-value does not establish that the subgroup associations are identical. Report the estimated subgroup odds ratios and predicted risks, with uncertainty where available, rather than relying only on the interaction test.

Diagnostics, Alternatives, and Limitations

Interaction terms increase model flexibility and can be difficult to estimate when few events occur in one subgroup or at the extremes of the biomarker distribution. Inspect the distribution of biomarker values and event counts within subgroups, look for sparse cells or separation, and assess whether the fitted probabilities are plausible. Compare predicted-risk curves with uncertainty intervals across the observed range; avoid emphasizing predictions far outside that range. Check calibration and other model diagnostics in a way that reflects the landmark population and horizon. Missing biomarker values and censoring before the horizon also require appropriate handling rather than silent exclusion or incorrect outcome coding.

The main alternative is a model without an interaction, which is more parsimonious but assumes a common biomarker slope on the log-odds scale. Separate subgroup models allow different associations but do not directly pool information or provide the same single interaction parameter; estimates can be unstable in small groups. A landmark Cox model can include a biomarker-by-covariate product too, but that interaction concerns log hazard, not fixed-horizon log odds. Translating it to absolute risk requires additional survival-model quantities, so the interpretations should not be interchanged.

A frequent mistake is to say, “The interaction coefficient is negative, so subgroup 1 has lower risk at every biomarker value.” The coefficient only describes a difference in slopes on the log-odds scale. The subgroup’s level also depends on the intercept and main effect, and absolute risks depend nonlinearly on the entire linear predictor. Calculate and present predicted risks for meaningful patient profiles before making a statement about which subgroup has greater risk.

Key takeaway: Include a biomarker-by-covariate product when the biomarker association is allowed to differ across patient groups. Interpret its coefficient on the model’s scale, then use subgroup-specific predicted risks to communicate what that fitted interaction means over the chosen horizon.

Check Your Understanding

Use the model and conventions in each question. The solutions follow each problem.

  1. A fitted model has \(\hat\beta_1=0.30\) and \(\hat\beta_3=0.40\) for a binary subgroup \(G\). What are the biomarker odds ratios per unit in groups 0 and 1, and what does the interaction estimate mean?

    Solution. Group 0 has odds ratio \(\exp(0.30)=1.350\). Group 1 has odds ratio \(\exp(0.30+0.40)=\exp(0.70)=2.014\). The ratio of group 1’s biomarker odds ratio to group 0’s is \(\exp(0.40)=1.492\); the biomarker odds ratio is estimated to be 1.492 times as large in group 1 on this model scale.

  2. For \(\operatorname{logit}(p)=-1+0.5X+0.4G+0.3XG\), calculate the predicted risk for \(X=1,G=1\).

    Solution. The linear predictor is \(-1+0.5+0.4+0.3=0.20\). Therefore \(p=1/\{1+\exp(-0.20)\}=0.5498\), or about 55.0% for the specified profile and horizon.

  3. A 95% confidence interval for \(\beta_3\) is \((-0.10,0.50)\). Does it establish that the biomarker associations are identical across groups?

    Solution. No. The interval includes zero, so it does not provide conventional 5% two-sided evidence of a nonzero interaction, but it also includes nonzero differences. The data do not establish identical associations.

  4. A patient was censored two months before the end of the prediction horizon and had no recorded event before censoring. Can the patient automatically be coded as event-free through the full horizon in ordinary fixed-horizon logistic regression?

    Solution. No. The event status through the full horizon is unknown. Coding the patient as event-free would assume unobserved follow-up showed no event; use complete ascertainment or an appropriate censoring-aware method instead.

  5. An analyst reports that a negative interaction coefficient proves the biomarker is protective in subgroup 1. What is wrong with this conclusion?

    Solution. The coefficient gives the difference between subgroup biomarker slopes on the log-odds scale; it is not the subgroup 1 slope by itself. That slope is \(\beta_1+\beta_3\), and neither its sign nor the absolute risk association can be determined from \(\beta_3\) alone.

Clinical Biostats