Why Include Covariate Interactions?
A logistic propensity model can represent treatment assignment as a function of measured pretreatment covariates. An additive model assumes that each covariate contributes separately to the log odds of treatment. That may be too restrictive: the association between one covariate and treatment may depend on the level of another. For example, age may relate differently to treatment assignment among patients with and without a particular baseline risk factor.
An interaction term gives the model a way to represent that dependence. It can change the estimated propensity scores for particular combinations of covariates even when the individual covariate values have not changed. This matters because propensity-score methods rely on the scores to address differences in measured covariates between treatment groups. Adding an interaction is a modeling choice to examine and diagnose, not a guarantee of balance.
The product \(XZ\) is a predictor in the model, not a new treatment or outcome. With two binary covariates, it is 1 only when both are 1. With continuous covariates, it varies across their observed values. An additive model is the special case \(\beta_{XZ}=0\); including a product term allows the fitted log odds to depart from that restriction.
Interpreting the Interaction
In a model with \(XZ\), the coefficient of \(X\) alone is not generally the effect of increasing \(X\) at every value of \(Z\). Holding \(Z=z\) fixed, a one-unit increase in \(X\) changes the log odds by \(\beta_X+\beta_{XZ}z\). Thus the corresponding conditional odds ratio is \(\exp(\beta_X+\beta_{XZ}z)\). Similarly, the conditional odds ratio for a one-unit increase in \(Z\), holding \(X=x\) fixed, is \(\exp(\beta_Z+\beta_{XZ}x)\).
For binary \(X\) and \(Z\), the interaction coefficient is a difference in log-odds contrasts. The effect of changing \(X\) from 0 to 1 when \(Z=0\) is \(\beta_X\); when \(Z=1\), it is \(\beta_X+\beta_{XZ}\). Their difference is \(\beta_{XZ}\). Consequently, \(\exp(\beta_{XZ})\) is the ratio of those two conditional odds ratios. It is not, by itself, an odds ratio for treatment.
Worked Example: An Additive Model Treats Two Combinations Alike
Suppose a hypothetical fitted model uses two binary pretreatment covariates, \(X\) and \(Z\), and has linear predictor $$ \hat\eta=-1+1X-1Z+1.5XZ. $$ Calculate fitted scores for the four combinations. Compare the interaction model with the additive model that omits \(XZ\).
For \(X=0,Z=0\), the product is 0, so \(\hat\eta=-1\) and \(\hat e=1/(1+\exp(1))=0.2689\). For \(X=1,Z=0\), \(\hat\eta=-1+1=0\), giving \(\hat e=0.5000\). For \(X=0,Z=1\), \(\hat\eta=-1-1=-2\), giving \(\hat e=1/(1+\exp(2))=0.1192\). For \(X=1,Z=1\), \(\hat\eta=-1+1-1+1.5=0.5\), giving \(\hat e=1/(1+\exp(-0.5))=0.6225\).
If the interaction is omitted, the additive linear predictor is \(-1+X-Z\). It gives \(\hat\eta=-1\) for both \((X,Z)=(0,0)\) and \((1,1)\), so both combinations receive the same fitted score, 0.2689. The interaction model instead gives the \((1,1)\) combination a score of 0.6225. The product term has changed the estimated assignment probability for a combination that the additive model treats like another combination.
The interaction coefficient is 1.5, so the odds ratio for changing \(X\) from 0 to 1 is \(\exp(1)=2.718\) when \(Z=0\), and \(\exp(1+1.5)=\exp(2.5)=12.18\) when \(Z=1\). Their ratio is \(\exp(1.5)=4.482\). These are conditional odds contrasts in the fitted treatment model, not causal effects of \(X\) or \(Z\).
Deriving the Conditional Odds Contrast
The conditional interpretation follows directly from the model. At fixed \(Z=z\), compare the log odds at \(X=x+1\) with those at \(X=x\). Subtracting the two linear predictors gives:
Because a difference in log odds is the logarithm of the odds ratio, exponentiating gives \(\exp(\beta_X+\beta_{XZ}z)\). This derivation also explains why interpreting \(\exp(\beta_X)\) as an overall odds ratio is wrong when \(Z\) varies: it is the odds ratio only at \(Z=0\). If zero is not a meaningful covariate value, centering can make that reference value more interpretable.
Worked Example: How the Association Changes Across a Covariate
Consider a hypothetical model with continuous \(X\), binary \(Z\), and fitted linear predictor $$ \hat\eta=-2+0.5X+0.8Z+0.4XZ. $$ Calculate the fitted scores at \(X=2\) for both values of \(Z\), and compare the conditional odds ratios for a one-unit increase in \(X\).
At \(X=2,Z=0\), the interaction product is zero and \(\hat\eta=-2+0.5(2)=-1\). The fitted score is \(1/(1+\exp(1))=0.2689\). At \(X=2,Z=1\), \(\hat\eta=-2+0.5(2)+0.8+0.4(2)=0.6\), so the fitted score is \(1/(1+\exp(-0.6))=0.6457\).
When \(Z=0\), the log-odds change per one-unit increase in \(X\) is \(0.5+0.4(0)=0.5\), giving an odds ratio of \(\exp(0.5)=1.649\). When \(Z=1\), the change is \(0.5+0.4(1)=0.9\), giving an odds ratio of \(\exp(0.9)=2.460\). The model therefore represents a stronger conditional association between \(X\) and treatment assignment when \(Z=1\). The numerical comparison is conditional on the specified model; it does not establish that \(X\) causes treatment.
Centering and Model Interpretation
When continuous covariates are involved, the values \(X=0\) and \(Z=0\) may be far from the data or lack a useful meaning. Centering replaces each covariate by its difference from a chosen reference value. With an interaction included, this changes the interpretation of the main-effect coefficients but need not change any fitted linear predictor or score.
Worked Example: Centering Without Changing the Fitted Score
Suppose a hypothetical model is \(\hat\eta=-1+0.4X+0.2Z+0.3XZ\). Center at \(X=2\) and \(Z=1\), defining \(X_c=X-2\) and \(Z_c=Z-1\). Rewrite the model and calculate the score at \(X=3,Z=2\).
Substitute \(X=X_c+2\) and \(Z=Z_c+1\). Expanding the product gives $$ \begin{aligned} \hat\eta &=-1+0.4(X_c+2)+0.2(Z_c+1)+0.3(X_c+2)(Z_c+1)\\ &=0.6+0.7X_c+0.8Z_c+0.3X_cZ_c. \end{aligned} $$
At \(X=3,Z=2\), the centered values are \(X_c=1,Z_c=1\). The centered model gives \(\hat\eta=0.6+0.7+0.8+0.3=2.4\). The original model also gives \(-1+0.4(3)+0.2(2)+0.3(6)=2.4\). Thus both give \(\hat e=1/(1+\exp(-2.4))=0.9168\). Centering changes the intercept and main-effect coefficients, but preserves the fitted score when the model is re-expressed exactly.
In the centered model, the coefficient 0.7 is the log-odds change per one-unit increase in \(X\) at the reference value \(Z=1\), rather than at \(Z=0\). The interaction coefficient remains 0.3.
Specification, Diagnostics, and Alternatives
A logistic interaction model assumes a linear predictor of the included covariate terms and uses the logistic link to map that predictor to a probability. If fitted by the usual Bernoulli likelihood, each observed treatment indicator is modeled as Bernoulli with probability \(e(X,Z)\), conditional on the included covariates. The chosen product term must be substantively defensible and the covariates must be measured before treatment. For causal use, interactions do not replace the assumptions required for propensity-score methods: measured covariates must suffice for conditional exchangeability, and treatment probabilities must be positive for the covariate patterns relevant to the target population.
An interaction may be useful when subject-matter knowledge or balance diagnostics suggest that treatment assignment varies across combinations of covariates. It should not be added solely because a coefficient has a small p-value, nor should a large p-value be treated as proof that no interaction matters. The modeling objective is not simply to predict treatment accurately. After estimating scores and applying the intended design, assess whether the measured covariates are balanced between treatment groups, including relevant combinations or functions of covariates. Also inspect the score distributions for treated and untreated units: poor overlap can remain even if the interaction improves balance in some regions.
If an interaction appears to improve balance, check whether that improvement is reasonably stable and whether it creates very low or very high fitted scores. If balance remains poor, reconsider the model’s functional form and covariate set rather than assuming the interaction has solved the problem. Earlier material on polynomial terms and transformations addresses other ways to represent nonlinear patterns; those terms and interactions can be combined when justified, but a more complicated predictor is not automatically better.
The main alternative is an additive logistic model, which is simpler and imposes a common log-odds change across values of the other covariates. It can be appropriate when that restriction is plausible and diagnostics support it. An interaction model is more flexible for the included pair but adds a coefficient and can be unstable when some covariate combinations are uncommon. A flexible prediction method is another possible alternative, but it does not remove the need to check balance, overlap, and the causal assumptions. No treatment-assignment model, however well fitted, corrects unmeasured confounding or establishes causal identification by itself.
Use pretreatment covariates and include the corresponding product term along with the covariate main effects.
For a one-unit change in \(X\) at \(Z=z\), calculate the log-odds change \(\beta_X+\beta_{XZ}z\), then exponentiate for the conditional odds ratio.
Evaluate the full linear predictor for each covariate pattern and transform it using \(1/\{1+\exp(-\hat\eta)\}\).
Check covariate balance and score overlap after applying the intended propensity-score procedure; do not infer success from coefficient tests alone.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In a logistic model with linear predictor \(\beta_0+\beta_X X+\beta_Z Z+\beta_{XZ}XZ\), what is the odds ratio for a one-unit increase in \(X\) when \(Z=2\)?
- For the model \(\hat\eta=-1+0.5X+0.5Z+1XZ\), calculate the fitted score when \(X=1,Z=1\).
- Why can centering \(X\) change the coefficient of \(Z\) in a model containing \(XZ\) without changing fitted scores?
- Does a statistically significant interaction coefficient establish that the estimated propensity scores achieve adequate covariate balance? Explain.
Solutions. (1) The log-odds change is \(\beta_X+2\beta_{XZ}\), so the odds ratio is \(\exp(\beta_X+2\beta_{XZ})\). (2) The linear predictor is \(-1+0.5+0.5+1=1\), so the fitted score is \(1/(1+\exp(-1))=0.7311\). (3) Re-expressing centered covariates redistributes terms among the intercept and main effects; when the product term is retained, the same original linear predictor can be written in the new coordinates, leaving each fitted score unchanged. (4) No. Statistical significance tests a model coefficient under assumptions; balance must be assessed directly for the measured covariates after the intended propensity-score procedure.