Tutorials › Causal Inference › Interpreting Interactions in Logistic and Poisson Models

Effect Modification and Subgroup Effects · Tutorial 859 of 972

Interpreting Interactions in Logistic and Poisson Models

Translate interaction coefficients into subgroup-specific odds ratios, rate ratios, probabilities, and rates without confusing the model’s link scale with an outcome-scale contrast.

Advanced 11 min read

What You'll Learn

  • Interpret treatment and treatment-by-subgroup coefficients in a logistic regression model.
  • Convert logistic-model coefficients into subgroup-specific odds ratios and predicted probabilities.
  • Interpret treatment-by-subgroup coefficients in a log-link Poisson rate model.
  • Distinguish interaction on the link scale from differences in probability or rate contrasts.
  • Identify when model-based subgroup comparisons can be interpreted causally.

Why the Link Scale Matters

A treatment-by-subgroup coefficient in a regression model describes how the treatment coefficient changes on the model’s link scale. It does not, by itself, state how much treatment changes the probability of an outcome or its rate within either subgroup. This distinction is especially important for logistic and log-link Poisson models: their links transform the outcome mean, so a constant contrast on the link scale generally translates into different contrasts on the outcome scale.

The practical task is therefore twofold. First, translate the fitted interaction into the subgroup-specific relative effect represented by the model: an odds ratio for logistic regression or a rate ratio for a log-link Poisson model. Then, when the scientific question concerns absolute outcomes, calculate subgroup-specific predicted probabilities or rates and contrast those predictions directly.

Logistic Regression: Interaction on the Log-Odds Scale

Let \(A\) be a binary treatment indicator, with \(A=1\) for treatment and \(A=0\) for control, and let \(S\) be a binary, pre-treatment subgroup indicator. Suppose \(Y\) is a binary outcome. A logistic model with a treatment-by-subgroup interaction is

$$ \operatorname{logit}\{P(Y=1\mid A,S)\} = \log\left(\frac{P(Y=1\mid A,S)}{1-P(Y=1\mid A,S)}\right) = \beta_0+\beta_A A+\beta_S S+\beta_{AS}AS. $$

This model assumes that the conditional log odds are represented by the stated linear predictor. In particular, with binary \(S\), it allows a distinct treatment log-odds contrast in each subgroup. The coefficients use \(A=0,S=0\) as the reference combination. They describe conditional probabilities for the specified model; a causal interpretation requires additional design and identification conditions discussed below.

Definition: In this binary-treatment, binary-subgroup logistic model, \(\beta_{AS}\) is the difference between the treatment log odds ratio in subgroup \(S=1\) and the treatment log odds ratio in subgroup \(S=0\). Equivalently, \(e^{\beta_{AS}}\) is the ratio of those two subgroup-specific odds ratios.

To see the interpretation, set \(S=0\). The treatment coefficient in the linear predictor is \(\beta_A\), so the treatment odds ratio is \(e^{\beta_A}\). Setting \(S=1\) makes the treatment coefficient \(\beta_A+\beta_{AS}\), giving a treatment odds ratio of \(e^{\beta_A+\beta_{AS}}\). Their ratio is

$$ \frac{e^{\beta_A+\beta_{AS}}}{e^{\beta_A}} = e^{\beta_{AS}}. $$

Thus \(\beta_{AS}=0\) means equal treatment odds ratios across the two subgroups under this model. It does not mean equal treatment risk differences, nor does it mean that treatment has no effect in either subgroup.

Worked Example: Translating a Logistic Interaction into Probabilities

Suppose a hypothetical fitted model for a binary clinical outcome has \(\beta_0=-2.00\), \(\beta_A=0.80\), \(\beta_S=1.20\), and \(\beta_{AS}=-0.50\). Treatment is coded \(A=1\), and the subgroup of interest is coded \(S=1\). Calculate the treatment odds ratio in each subgroup and the four model-predicted probabilities.

For \(S=0\), the treatment log-odds contrast is \(\beta_A=0.80\). The treatment odds ratio is

$$ e^{0.80}=2.226. $$

The control linear predictor is \(-2.00\), so the control probability is \(1/(1+e^{2.00})=0.1192\). Under treatment, the linear predictor is \(-2.00+0.80=-1.20\), giving probability \(1/(1+e^{1.20})=0.2315\). The predicted risk difference is \(0.2315-0.1192=0.1123\), or 11.23 percentage points.

For \(S=1\), the treatment log-odds contrast is \(\beta_A+\beta_{AS}=0.80-0.50=0.30\). The treatment odds ratio is \(e^{0.30}=1.350\). The control linear predictor is \(-2.00+1.20=-0.80\), giving probability \(1/(1+e^{0.80})=0.3100\). Under treatment it is \(-2.00+0.80+1.20-0.50=-0.50\), giving probability \(1/(1+e^{0.50})=0.3775\). The predicted risk difference is \(0.3775-0.3100=0.0675\), or 6.75 percentage points.

The interaction coefficient says that the treatment odds ratio in \(S=1\) is \(e^{-0.50}=0.6065\) times the treatment odds ratio in \(S=0\). The model-predicted risk differences also differ, but their difference is \((0.0675)-(0.1123)=-0.0448\), or -4.48 percentage points. That probability-scale contrast is not \(\beta_{AS}\); it is calculated from the four predicted probabilities.

Why Equal Odds Ratios Need Not Mean Equal Risk Differences

The logistic transformation is nonlinear. Consequently, even a model with no treatment-by-subgroup term can imply different probability changes in subgroups with different baseline risks. The following example isolates this point: it has no interaction on the log-odds scale, yet its predicted risk differences are unequal.

Worked Example: No Logistic Interaction, Different Risk Differences

Consider a hypothetical logistic model with \(\beta_0=\operatorname{logit}(0.10)=\log(0.10/0.90)=-2.197\), \(\beta_A=\log(2)=0.6931\), \(\beta_S=\log(9)=2.197\), and \(\beta_{AS}=0\). The subgroup \(S=1\) therefore has higher baseline odds, while the treatment odds ratio is 2 in both subgroups.

For \(S=0\), the control odds are \(0.10/0.90=0.1111\). Doubling the odds gives treated odds \(0.2222\), hence treated probability \(0.2222/(1+0.2222)=0.1818\). The risk difference is \(0.1818-0.1000=0.0818\), or 8.18 percentage points.

For \(S=1\), the control log odds are \(-2.197+2.197=0\), so the control probability is 0.5000. Doubling the odds from 1 to 2 gives treated probability \(2/(1+2)=0.6667\). The risk difference is \(0.6667-0.5000=0.1667\), or 16.67 percentage points.

Both subgroups have the same treatment odds ratio, and \(\beta_{AS}=0\), but their predicted risk differences are 8.18 and 16.67 percentage points. Therefore, absence of interaction on the log-odds scale is not evidence that absolute treatment benefit is equal across subgroups.

Log-Link Poisson Models: Interaction on the Log-Rate Scale

For count outcomes, a Poisson model with a log link can represent rates when observations have differing amounts of exposure time. Let \(Y\) be a count and \(T\) the exposure time. A common model is

$$ \log\{E(Y\mid A,S,T)\} = \log(T)+\gamma_0+\gamma_A A+\gamma_S S+\gamma_{AS}AS. $$

Here \(\log(T)\) is an offset: its coefficient is fixed at 1. The model states that the expected count is proportional to exposure time and that the log rate follows the stated linear predictor. Equivalently, the conditional expected rate is \(E(Y\mid A,S,T)/T\). For interpreting the mean and rate ratios, the essential requirement is that this conditional mean model is appropriate. If conventional Poisson likelihood standard errors are used, the additional Poisson distribution and variance assumptions matter for those standard errors; they are not needed for the algebraic interpretation of the fitted mean coefficients.

At \(S=0\), the treatment rate ratio is \(e^{\gamma_A}\). At \(S=1\), it is \(e^{\gamma_A+\gamma_{AS}}\). Thus \(e^{\gamma_{AS}}\) is the ratio of the subgroup-specific treatment rate ratios. A positive \(\gamma_{AS}\) means the treatment rate ratio is larger in \(S=1\) than in \(S=0\); it does not, by itself, mean that the treatment rate is higher in absolute terms in that subgroup.

Worked Example: Interpreting a Poisson Rate Interaction

Suppose a hypothetical Poisson model for event counts uses person-years as exposure time. Let the estimated coefficients be \(\gamma_0=\log(0.040)\), \(\gamma_A=\log(0.75)=-0.2877\), \(\gamma_S=\log(1.50)=0.4055\), and \(\gamma_{AS}=\log(1.20)=0.1823\). Rates are measured in events per person-year.

For \(S=0\), the control rate is \(e^{\gamma_0}=0.0400\) events per person-year. The treatment rate ratio is \(e^{\gamma_A}=0.75\), so the treated rate is \(0.0400(0.75)=0.0300\) events per person-year. The treatment rate difference is \(0.0300-0.0400=-0.0100\) events per person-year.

For \(S=1\), the control rate is \(0.0400(1.50)=0.0600\) events per person-year. The treatment rate ratio is \(e^{\gamma_A+\gamma_{AS}}=0.75(1.20)=0.900\). The treated rate is \(0.0600(0.900)=0.0540\) events per person-year, and the rate difference is \(0.0540-0.0600=-0.00600\) events per person-year.

The interaction implies a ratio of rate ratios of \(e^{0.1823}=1.20\): the treatment rate ratio is 20% larger in \(S=1\) than in \(S=0\). Both point estimates indicate lower rates under treatment, but the absolute rate reductions differ: 0.0100 versus 0.00600 events per person-year. The interaction coefficient is not itself either rate difference.

From Model Predictions to Causal Subgroup Effects

The equations above first describe conditional associations under specified regression models. To interpret a predicted treatment contrast as causal, the subgroup must be defined before treatment, treatment versions and outcomes must be well defined, and the usual identification conditions must be credible. In a randomized study, random assignment within the relevant population supports exchangeability between treatment groups. In an observational study, conditional exchangeability requires adequate control of treatment-outcome confounding within the subgroup. In either setting, consistency and positivity are also required: observed outcomes must correspond to the assigned treatment, and each treatment must be possible for the covariate profiles being compared.

Under these conditions, model predictions for \(A=1\) and \(A=0\) within a subgroup can be used to form subgroup-specific causal contrasts, provided the model correctly represents the conditional outcome mean for the target profiles. The logistic model produces probabilities by applying the inverse-logit function to its linear predictor. The Poisson model produces rates by exponentiating the rate linear predictor. Contrasting those predictions on the probability or rate scale answers an absolute-effect question. The interaction coefficient instead answers a relative-effect question on the model’s link scale.

1
Identify the link and reference subgroup.
For the models here, the link is logit for a binary outcome and log for a Poisson mean or rate. With \(S=0\) as the reference, \(\beta_A\) or \(\gamma_A\) is the treatment coefficient in that subgroup.
2
Calculate each subgroup’s relative effect.
For logistic regression, exponentiate \(\beta_A\) and \(\beta_A+\beta_{AS}\) to obtain odds ratios. For the log-link Poisson model, exponentiate \(\gamma_A\) and \(\gamma_A+\gamma_{AS}\) to obtain rate ratios.
3
Calculate outcome-scale predictions if needed.
Obtain the predicted probability or rate under treatment and control separately in each subgroup. Subtract predictions for a probability or rate difference; do not interpret the interaction coefficient as that difference.

Common Mistake: Treating the Interaction Coefficient as an Absolute Effect

A frequent error is to read a negative logistic interaction coefficient as “treatment reduces risk by this many percentage points more in the subgroup.” That statement is wrong: the coefficient is a difference in log odds ratios, and its exponent is a ratio of odds ratios. The corresponding probability-scale subgroup contrasts require inverse-logit predictions under both treatment conditions and then subtraction. Likewise, a Poisson interaction coefficient describes a log rate-ratio contrast, not a difference in event rates.

A second error is to conclude that a zero interaction coefficient means no subgroup heterogeneity of any kind. It means no interaction on the model’s link scale under the specified model. As the logistic example showed, probability-scale treatment differences can vary even when the log-odds interaction is zero. Always name the scale of the effect and the scale on which the interaction is being described.

Key takeaway: In logistic regression, the treatment-by-subgroup coefficient compares subgroup-specific log odds ratios; in a log-link Poisson model, it compares subgroup-specific log rate ratios. Predicted probability or rate contrasts are separate calculations on the outcome scale.

Check Your Understanding

Use the model scale and the requested outcome scale carefully.

  1. In the logistic model, what is the treatment odds ratio in subgroup \(S=1\) in terms of \(\beta_A\) and \(\beta_{AS}\)?
  2. If \(\beta_{AS}=0\), what is equal across subgroups in the logistic model, and what is not necessarily equal?
  3. In a log-link Poisson model, what does \(e^{\gamma_{AS}}\) compare?
  4. Why must you calculate predicted probabilities before reporting a risk difference from a logistic model?
  5. Name two conditions needed, beyond fitting a regression model, to give subgroup treatment contrasts a causal interpretation.
Clinical Biostats