Author-reviewedEvidence: highv1.0.0

Interaction Effect

A difference in one variable’s effect across levels of another variable, defined on a specified outcome and measurement scale.

Last reviewed byDr Darrin Baines

Concept Architecture

Interaction Effect: Concept Architecture

When one effect depends on another variable

An interaction effect describes how the association or effect of one variable changes across values of another variable on a specified outcome scale. A treatment may have a different effect for patients with different baseline risks, for example. Interactions also arise between two exposures, between time and treatment, or between model parameters. The statement “there is an interaction” is incomplete without naming the outcome, both variables, scale, population, and contrast being compared.

In a randomized study, a prespecified baseline variable can be investigated as a treatment-effect modifier. In an observational study, an interaction term is initially an association, and causal interpretation needs adequate control of confounding and a clear intervention question. An interaction is not itself proof that two biological mechanisms literally act on each other; statistical, clinical, and biological interaction are related but distinct ideas.

Write the contrast before fitting the model

Let AA indicate treatment (00 for comparator, 11 for treatment) and ZZ indicate a baseline group (00 or 11). On an additive outcome scale, let maz=E(Y∣A=a,Z=z)m_{az}=E(Y\mid A=a,Z=z). The treatment difference within group zz is m1z−m0zm_{1z}-m_{0z}, and the difference between those treatment differences is:

Iadd=(m11−m01)−(m10−m00).I_{\mathrm{add}}=(m_{11}-m_{01})-(m_{10}-m_{00}).

The sign depends on which treatment, group, and outcome direction are coded as positive. If YY is a beneficial outcome, a positive IaddI_{\mathrm{add}} means a larger treatment gain in group 1 than group 0. If YY is an adverse-event risk, a negative value may mean a larger absolute risk reduction in group 1. This difference-in-differences description concerns outcomes, not necessarily a before-and-after causal design.

A linear model can encode the same contrast, with appropriate assumptions about the conditional mean:

E(Y∣A,Z)=β0+βAA+βZZ+βAZAZ.E(Y\mid A,Z)=\beta_0+\beta_A A+\beta_Z Z+\beta_{AZ}AZ.

For binary AA and ZZ, βA\beta_A is the treatment contrast when Z=0Z=0, βA+βAZ\beta_A+\beta_{AZ} is the contrast when Z=1Z=1, and βAZ=Iadd\beta_{AZ}=I_{\mathrm{add}} for this saturated four-cell mean model. The “main effect” βA\beta_A is therefore not automatically the population-average effect. For continuous ZZ, the conditional treatment contrast is βA+βAZZ\beta_A+\beta_{AZ}Z under this linear specification, so centering ZZ changes the interpretation of βA\beta_A but not fitted values. Extrapolation to poorly observed values of ZZ needs caution.

See why the scale changes the conclusion

Suppose an illustrative trial has the following one-year probabilities of an adverse event. These are invented cell risks for teaching; the table does not contain sampling uncertainty.

Baseline groupComparator riskTreatment riskAbsolute risk differenceTreatment/comparator risk ratio
Lower risk0.100.05−0.05-0.050.500.50
Higher risk0.400.20−0.20-0.200.500.50

Treatment reduces absolute event risk by five percentage points in the lower-risk group and 20 points in the higher-risk group. With the coding above, the additive interaction in risk differences is −0.20−(−0.05)=−0.15-0.20-(-0.05)=-0.15, or 15 percentage points more absolute reduction in the higher-risk group. Yet both risk ratios equal 0.500.50, so there is no interaction on the risk-ratio scale in these numbers. A claim of no effect modification based solely on equal relative risks would hide a clinically important difference in absolute benefit.

An odds ratio is different from a risk ratio. Fitting a logistic model with an AZAZ product term tests interaction on the log-odds scale, not directly on the absolute-risk scale. Even if the logistic product coefficient is zero, predicted absolute risk differences can vary across baseline risk; odds ratios are also noncollapsible, so conditional and marginal odds-ratio comparisons require care. When policy depends on people treated or events prevented, report predicted risks and risk differences by group as well as a model coefficient.

Match the model to the question

In a generalized linear model, an interaction term can be written on the chosen link scale:

g{E(Y∣A,Z)}=β0+βAA+βZZ+βAZAZ.g\{E(Y\mid A,Z)\}=\beta_0+\beta_A A+\beta_Z Z+\beta_{AZ}AZ.

With an identity link, βAZ\beta_{AZ} is an additive contrast of conditional means. With a log link, its exponential compares multiplicative treatment ratios across the two groups. With a logit link, its exponential is a ratio of conditional odds ratios. The coefficient has to be interpreted on that link scale, and an outcome-scale interaction can be obtained by converting fitted values back to predicted outcomes and forming the desired contrast. Interactions involving time may reflect changing treatment effects, but their interpretation depends on the time scale and model—for example, a treatment-by-time term in a longitudinal mean model is not automatically a time-varying hazard ratio.

Higher-order interactions or many candidate modifiers rapidly multiply the possible contrasts. State a small number of clinically motivated comparisons and the scale before searching the data. For continuous modifiers, consider a plausible functional form, such as a smooth interaction, rather than choosing an arbitrary cut point just to create subgroups. Check data support and overlap across the values of AA and ZZ used for prediction.

Test the interaction rather than comparing two p-values

The correct question is whether the effects differ between groups, estimated with an interaction contrast and its uncertainty. “Significant in group 1, not significant in group 0” does not establish that the groups differ; one estimate may simply be less precise. Report each subgroup's estimate and confidence interval together with a confidence interval and, if appropriate, a test for the interaction contrast. A nonsignificant test likewise does not establish equal effects when the study has little power to detect heterogeneity.

Prespecify credible baseline modifiers where possible, distinguish confirmatory from exploratory analyses, and consider multiplicity from testing many groups or scales. Look for consistency with prior evidence and mechanism, avoid selective reporting, and seek external replication when a surprising subgroup finding would change practice. Randomization supports treatment comparisons within baseline groups on average, but it does not randomize group membership or guarantee adequate sample size in every group. A variable measured after treatment starts can be affected by treatment; conditioning on it can introduce bias and needs a different causal analysis.

Use interactions in economic evaluation

An average effect may conceal important variation in baseline risk, QALYs, costs, or treatment harm. A decision model can predict each group’s costs and QALYs under each intervention and calculate group-specific incremental outcomes, then average them with appropriate target-population weights for the overall decision. Do not insert a single interaction coefficient as though it were an absolute QALY gain; propagate it through the link function, event risks, survival, utilities, and resource use with consistent uncertainty.

For example, suppose a treatment adds 0.04 QALYs in one baseline group and 0.12 QALYs in another, at an incremental cost of £2,000 per person in each group. The additive QALY interaction is 0.12−0.04=0.080.12-0.04=0.08 QALYs. At an illustrative value of £30,000 per QALY, incremental net monetary benefit is 30,000(0.04)−2,000=−80030{,}000(0.04)-2{,}000=-800 GBP in the first group and 30,000(0.12)−2,000=1,60030{,}000(0.12)-2{,}000=1{,}600 GBP in the second. Those point estimates illustrate why a subgroup decision could differ; actual decisions need credible interaction evidence, parameter uncertainty, costs, eligibility, feasibility, and equity considerations. The group-specific cost difference was assumed equal here for simplicity, not as a general property of interactions.

Beware of confusing higher absolute benefit caused by different baseline risk with a different relative treatment effect, as the earlier risk example shows. Also distinguish effect heterogeneity from a different subgroup prevalence in the target population: the latter changes the average benefit even if group-specific effects themselves are unchanged. Report the distribution of the effect modifier when transporting results from a trial to a service population.

Report the contrast readers can use

Name the outcome and its favourable direction, the treatment and modifier definitions, the chosen additive or multiplicative scale, the model link, covariate adjustment, and whether the modifier was measured before treatment. Show the four predicted outcomes for two binary factors when possible, not only a coefficient. Include subgroup-specific effects, the interaction contrast with uncertainty, the analysis plan, multiple-testing considerations, and how the result changes costs, health outcomes, or the decision. This makes a claim of “interaction” testable and interpretable rather than a label attached to a small p-value.

Sources and further reading

Library

Publications

1
  • Book

    Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)

    A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.

Frequently Asked Questions (6)

  • What is an interaction effect?

    The portion of output variance attributable to two or more parameters varying together, beyond what each parameter's individual effect alone would explain.

    Source: Saltelli et al. 2008

  • Why can interaction effects be missed by one-way analysis?

    An interaction effect is the part of a model's output variation that appears only when two or more inputs change together, beyond the sum of what each does alone. A one-way analysis, moving inputs singly, holds the others fixed and so can never reveal it, potentially understating an input whose influence emerges mainly in combination. Capturing interactions requires varying inputs jointly, as global methods do. Ignoring them can give a misleading picture of what drives the result. Saltelli and colleagues (2008) describe interaction effects.

    Source: Saltelli et al. 2008

  • How is an interaction effect measured?

    An interaction effect is measured in variance-based sensitivity analysis as variance not explained by the individual first-order effects: the difference between an input's total-effect index, which includes its interactions, and its first-order index reflects its interaction with other inputs, and higher-order indices quantify the joint contribution of specific groups of inputs. Estimating these requires Monte Carlo procedures with structured samples. A gap between total and first-order effects, or the sum of first-order effects falling short of the total variance, signals the presence of interaction effects.

    Source: Sobol 2001

  • How does an interaction effect differ from a main effect?

    A main effect is the output variance explained by an input varying on its own, while an interaction effect is the additional variance explained only when two or more inputs vary together, beyond the sum of their individual main effects. So the main effect is the input's direct influence and the interaction effect its joint influence with others. When interaction effects are large, the model is non-additive, and an input's importance cannot be judged from its main effect alone, since much of its influence may act through interactions.

    Source: Saltelli et al. 2008

  • Why do interaction effects matter?

    Interaction effects matter because when inputs act jointly, an input with a small individual effect can still be influential through its interactions, so judging importance from main effects alone would understate it and could wrongly fix a consequential input as negligible. Large interaction effects also reveal that the model behaves non-additively, which affects interpretation and how uncertainty is analysed. Recognising interaction effects, through the gap between total and first-order sensitivity indices, ensures that inputs mattering mainly through joint action are properly identified and retained.

    Source: Sobol 2001

  • What are the limitations of analysing interaction effects?

    Analysing interaction effects, especially quantifying specific higher-order interactions, is computationally demanding, since estimating variance-based indices for combinations of inputs requires many model runs, and the number of possible interactions grows rapidly with the number of inputs. Total-effect indices capture all of an input's interactions together without separating them, while fully decomposing interactions is often impractical. Results depend on the input assumptions. These limitations mean interaction effects are usually assessed through total-effect indices, with detailed decomposition reserved for cases where specific joint influences must be understood.

    Source: Saltelli et al. 2008

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 25 Sep 2026

Content version: 1.0.0

Canonical Identity

Term code
HE-EM-UA-034

Stable URI · Machine-readable · Resolvable · CC BY 4.0