Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2024 Aug 29.
Published in final edited form as: Hosp Pediatr. 2023 Oct 1;13(10):e319–e323. doi: 10.1542/hpeds.2023-007259

How to interact with interactions: what clinicians should know about statistical interactions

Jillian Cotter 1, Sarah Schmiege 2, Angela Moss 3, Lilliam Ambroggio 1,4
PMCID: PMC11360074  NIHMSID: NIHMS2014690  PMID: 37732385

Introduction

Most outcomes are not caused by or associated with a single predictor variable in isolation. Instead, these relationships involve many other variables (i.e., third variables).1 Statistical models can help make sense of these complex relationships. A statistical interaction is a type of third variable effect that assesses whether the relationship between a predictor and outcome is modified by a third variable. For example, you can use an interaction to evaluate whether the effect of treatment on patient outcomes differs by a child’s comorbidity to determine if treatment is more effective in certain subpopulations. However, terminology and interpretation of interactions can be confusing, hindering the use of this method and understanding of these studies. Our objectives were to 1) define interaction and how it differs from other third variable approaches (e.g., confounder, mediator), 2) identify benefits and limitations of ways to evaluate potential interactions (e.g., interaction term versus stratified analysis), and 3) review interpretations of interaction effects.

This paper highlights interactions between two categorical variables as this is the simplest and most common application of interactions in medicine. However, the principles discussed here can be applied to interactions with continuous variables, higher order interactions (i.e., between three or more variables), or models with multiple interactions.

Interaction Versus Other Approaches to Third Variables

Three common methods to account for third variable effects include incorporating interactions, mediation, and confounders into models. Understanding the distinction between these is important to properly set up the model (Table 1). To illustrate this distinction, we will examine a study that evaluated the effect of limited English proficiency (LEP) on readmissions for hospitalized children. They used several third variables including income and race/ethnicity. Note, the term “third variable” is used for simplicity; in reality, complex relationships involve more than three variables.

Table 1.

Third Variable Types

Third variable Definition Statistical Analysis Example
Interaction/ Effect modifier Evaluates whether the effect of exposure on outcome differs by the value of the 3rd variable or the combined effects of the exposure and 3rd variable
  1. Regression model that includes exposure, 3rd variable, & interaction term, or

  2. Stratified analysis of exposure on outcome at each level of the 3rd variable

Association between limited English proficiency (LEP) and readmissions is modified by family income (i.e., association differs by the level of family income; Table 1)
Mediator 3rd variable is intermediate step on causal pathway Regression based methods for testing indirect/mediated effects or potential outcomes framework6,7 Association between LEP and readmission is mediated by knowledge of outpatient care (i.e., LEP patients may have reduced knowledge of outpatient care leading to greater ED visits and increased readmissions)
Confounder 3rd variable is associated with the exposure and outcome but not an intermediate step in the causal pathway Include a confounder as a term in a multivariable regression model to provide an estimate of the exposure adjusted for the confounder Association between LEP and readmissions is confounded by race/ethnicity (i.e., race/ethnicity differs between LEP and non-LEP and may influence readmission)

An interaction evaluates whether and how the relationship between an exposure and outcome is modified by the value of a third variable.2 In medicine, interactions commonly assess how the effect of an exposure, treatment, or intervention may differentially impact outcomes in different subgroups of people or settings.1 Additionally, interactions can evaluate the combined effect of two treatments or interventions on outcomes or behaviors. To address interactions, models can include an interaction term, which is the multiplication of two variables (exposure*third variable). “Interaction” and “effect modification” are often used interchangeably, although there are differences that are beyond the scope of this manuscript.2 For simplicity, we will refer to both as “interaction”.

In the example, the effect of LEP (exposure) on readmissions (outcome) was hypothesized to differ by family income (third variable), so they included an interaction between LEP and income.3 They found a significant interaction (p=0.03), meaning the association between LEP and readmissions was modified by income. Among families in the lowest income quintile, LEP patients had higher odds of readmission compared with English proficient patients (OR 1.77 [1.03–3.05]; Table 2). Among those in the highest income quintiles, there was no association. This suggests that LEP status affects readmissions among the poorest patients, thereby identifying a vulnerable subpopulation.

Table 2.

Interaction Example from the Literature

Income quintile Adjusted odds of readmission (OR [95% CI])
First/second quintile
 English proficiency Reference
 LEP 1.77 (1.03–3.05)
Third quintile
 English proficiency Reference
 LEP 0.99 (0.82–1.20)
Fourth quintile
 English proficiency Reference
 LEP 0.92 (0.79–1.08)
Fifth quintile
 English proficiency Reference
 LEP 1.06 (0.79–1.41)

This study evaluated the association between limited English proficiency (LEP) and risk of readmission with an interaction between LEP and family income quintile.3 The interaction term was significant (p=0.03), meaning that the association between LEP and readmission was modified by family income. This adapted table displays the stratified odds of readmission for patients with LEP vs. English proficient patients among each level of the third variable (income quintiles). Only the OR in the first/second quintile was significant meaning that among the poorest patients, LEP was associated with increased odds of a readmission. This relationship was not true for other income quintiles. Of note, one cannot compare the ORs across income strata because they each have a different reference group. Instead, an interaction term is needed to statistically evaluate if the groups have different effects (i.e., the above-mentioned p=0.03, which is not included in a stratified analysis).

Mediation assesses whether a third variable is on the causal pathway between exposure and outcome and is evaluated by analyzing mediated effects.4 A possible mediated effect in the above example is that LEP may influence knowledge of outpatient care leading to greater Emergency Department visits which may influence readmissions.

Confounding exists when exposure groups differ with respect to the third variable and that variable influences outcomes but is not on the causal pathway.5 Confounders distort the true association between exposures and outcomes and can be adjusted for in models.1,5 While interaction terms and mediation assist with describing the relationship between variables by considering clinically relevant third variables, confounding is about accounting for unanticipated effects of third variables.1 In the unadjusted analysis of the above study, there was a significant association between LEP and readmission rates, but after adjusting for confounders (e.g., race/ethnicity) it was no longer significant. Thus, our results would have been misleading had we not adjusted for race/ethnicity as a confounder.

Not including an interaction or improperly including it as a confounder may also lead to inaccurate conclusions.6 In the above example, the adjusted analysis included income as a confounder instead of an interaction and found no association between LEP and readmissions. If they had not secondarily evaluated income as an interaction, they would have missed identifying a vulnerable subpopulation.

Interaction Term vs. Stratified Analysis

Interactions can be accounted for by including a statistical interaction term, or performing stratified analysis, which tests the association between exposure and outcome by separating the group by the value of the third variable. Although stratified analyses may be easier to interpret, they have significant limitations compared to models with interaction terms. 1) A stratified analysis has reduced statistical power, which is particularly important in small sample sizes.7 2) Unlike interaction terms, stratified analyses cannot be performed if investigators want to include a continuous third variable. Continuous variables can be categorized for stratified analyses, but the interpretation of these categories should be clinically relevant. If not, it can be beneficial to keep variables continuous and use interaction terms.8 3) A stratified analysis splits data according to the third variable and conducts separate analyses within groups; therefore, there is no common reference group and no way to statistically compare the groups. This comparison can be done with an interaction term. To further explain this point, both a stratified analysis and interaction term model will provide effect estimates (e.g., odds ratios [OR], confidence intervals [CI]) for the relationship between exposure and outcome for each value of the third variable. A model with an interaction term will additionally evaluate whether the interaction was statistically significant (i.e., whether the association between exposure and outcome is different based on the value of the third variable). This comparison cannot be done in a stratified analysis. This is important as sometimes the scientific question relies on the ability to compare subgroups, such as whether the effect of an intervention is different in different populations. Thus, a stratified analysis can be used as a quick way to see if there are potential differences, but an interaction term is the most informative and accurate approach.

To illustrate this last point, we will compare the findings of a stratified analysis and interaction term using an example in primary care. This study found that an intervention involving prompts to clinicians to discuss asthma control (exposure) was associated with an increased likelihood of guideline-concordant asthma treatment (outcome).9 They performed a stratified analysis of patients who were and were not using preventative asthma medications (third variable). The odds of guideline-concordant treatment associated with the intervention was 2.01 (95% CI: 1.19–3.38) among children using preventative medication and 6.25 (3.39–11.54) for children not on preventative medication. While the ORs look different, we cannot statistically compare them as the reference groups are different (children in the control group using preventative medications vs. children in the control group not using preventative medications, respectively). Thus, we cannot assess for statistical differences between them. This would leave us guessing whether the relationship differs significantly between groups. Fortunately, they additionally included an interaction term and found that it was significant, allowing them to conclude that the intervention effect was larger in one subgroup. The knowledge that children not on preventative medication may benefit most from the intervention can inform future targeted dissemination.

Interpretation of Interactions

Interaction analyses can yield multiple effect estimates which can make interpretation challenging. Typically, there is an effect estimate by each level of the third variable which answer the question – for a certain level of the third variable, is the exposure significantly associated with the outcome? There is also a p-value or effect estimate for the interaction term which answers the question - is the association between exposure and outcome statistically different for the different levels of the third variable? If the interaction term is significant, the effect of the exposure on the outcome depends on the third variable. If not, then the association does not differ by the third variable. In the asthma example, the interaction term was significant, meaning that the effect of the intervention differed depending on whether patients were using preventative medications. How to perform and report interactions are beyond the scope of this paper but can be found in existing resources.2,10

Examples below highlight the interpretation of interactions:

  1. An interaction can influence the magnitude of the effect. The asthma study highlights an example of a significant interaction (OR 0.31 [0.15–0.68]) with two positive, significant ORs for the groups (OR 2.01 [1.19 to 3.38] and OR 6.25 [3.39–11.54]).9 Thus, the intervention was associated with guideline-concordant treatment in both groups. The significant interaction (OR 0.31 [0.15–0.68]), not a comparison of the two ORs (since they have different reference groups), demonstrates that the effect was significantly larger for children not on preventative medications.

  2. An interaction can impact the significance of the effect. A study found that feeding type (exposure, bottle vs. breast) was associated with an increased risk of pyloric stenosis (outcome) in infants (OR 2.31 [2.78–7.03]).11 However, there was a significant interaction term with maternal age (p<0.001, third variable), meaning that this relationship was modified by maternal age. Young mothers had no association between feeding type and pyloric stenosis (OR 0.98 [0.51–1.88]), but older mothers had a significant association (OR 6.07 [2.23–5.24]). Thus, further studies can explore this relationship, specifically focusing on older mothers.

  3. An interaction can impact the direction of the effect. In an analysis of randomized controlled trials evaluating the impact of corticosteroids (exposure) on death or cerebral palsy in preterm infants (outcome), there was no association (risk difference 0.03 [−0.01 to 0.08]).12 When adding an interaction based on the risk of chronic lung disease (third variable), the interaction was significant (p=0.002); thus, the impact of treatment differed based on the risk of chronic lung disease. Authors found that when the risk was low, steroids increased the likelihood of poor outcomes, but when the risk was high, steroids reduced them. This highlights the importance of including interactions - the initial analysis without interactions found no association and would have missed these key findings.

  4. Interactions can highlight how the effect of a combination of exposures can differently impact the outcome versus the effect of individual exposures. A study found that children with a combination of prenatal tobacco exposure and high lead concentrations had a higher risk of attention-deficit/hyperactivity disorder (OR 8.1 [3.5–18.7]) compared to children with individual exposures alone (lead: OR 2.3 [1.5–3.8], tobacco: OR 2.4 [1.5–3.7]) based on a significant interaction term between lead and tobacco (P <.001).13 Thus, children with both exposures may be a valuable target for future interventions.

  5. An interaction may not be significant. Our study among children hospitalized with suspected pneumonia found no association between antibiotic use and length of stay (effect estimate 0.98 [0.88–1.10]).14 Because we hypothesized that the effect of antibiotics may differentially impact children based on their risk of bacterial disease, we evaluated whether this relationship was modified by radiographic pneumonia (a surrogate marker of bacterial risk). We found that the interaction was not significant (p>0.05); thus, the association between antibiotic use (exposure) and outcomes did not differ based on radiographic pneumonia (third variable). This is important because in a heterogenous population such as pneumonia, it is valuable to determine whether results differ between subgroups.

Limitations of Interactions

A big limitation is that interactions can be complicated to interpret. This can be reduced by including tables in the manuscript that follow recommended guidelines, tables that clearly define the comparisons being made, and discussions that properly interpret the findings and their clinical relevance.2,10 The more interactions included, the more difficult it is to interpret. Thus, interactions should be limited to those that are clinically meaningful.

Conclusion

In summary, if investigators are interested in assessing whether the association between an exposure and outcome differs based on the value of a third variable, an interaction term can be included in the model. Interactions can answer clinically relevant questions that other analyses cannot (Table 3).

Table 3.

Key Points About Interactions

What is it?
  • 3rd variable that modifies the association between exposure and outcome

When to use it?
  • Assess how the effect of an exposure may differentially impact subgroups of people, settings, or situations

  • Evaluate the combined effect of two treatments or interventions

Benefits?
  • Both an interaction term and stratified analysis can account for interaction

  • Model with an interaction term has benefits over a stratified analysis:
    • more power
    • can include a continuous third variable, and
    • can statistically compare stratified groups to one another
Limitations?
  • Challenging to interpret

How to interpret it?
  • Effect estimates for stratified groups:

    For a given level of the 3rd variable, what is the association between exposure and outcome?

  • Effect estimate/p-value for interaction term:

    Does the association between exposure and outcome differ by the level of the 3rd variable?

Funding:

No funding was secured for this study.

Abbreviations:

CI

Confidence interval

LEP

Limited English proficiency

OR

Odds ratio

Footnotes

Conflict of Interest Disclosures: The authors have no conflicts of interest relevant to this article to disclose.

References

  • 1.Bours MJL. Tutorial: A nontechnical explanation of the counterfactual definition of effect modification and interaction. J Clin Epidemiol 2021;134:113–24. doi: 10.1016/j.jclinepi.2021.01.022. [DOI] [PubMed] [Google Scholar]
  • 2.Knol MJ, VanderWeele TJ. Recommendations for presenting analyses of effect modification and interaction. Int J Epidemiol 2012;41(2):514–20. doi: 10.1093/ije/dyr218. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Ju M, Luna N, Park KT. The Effect of Limited English Proficiency on Pediatric Hospital Readmissions. Hospital pediatrics. 2017;7(1):1–8. doi: 10.1542/hpeds.2016-0069. [DOI] [PubMed] [Google Scholar]
  • 4.VanderWeele TJ. Mediation Analysis: A Practitioner’s Guide. Annu Rev Public Health. 2016;37(1):17–32. doi: 10.1146/annurev-publhealth-032315-021402. [DOI] [PubMed] [Google Scholar]
  • 5.Pourhoseingholi MA, Baghestani AR, Vahedi M. How to control confounding effects by statistical analysis. Gastroenterol Hepatol Bed Bench 2012;5(2):79–83. [PMC free article] [PubMed] [Google Scholar]
  • 6.Jupiter DC. Effect Modification and Interaction Terms: It Takes Two to Tango. The Journal of Foot and Ankle Surgery. 2016;55(4):899–902. doi: 10.1053/j.jfas.2016.05.008. [DOI] [PubMed] [Google Scholar]
  • 7.Szklo M, Nieto J. Epidemiology: Beyond the Basics: Jones & Bartlett Learning; 2007. [Google Scholar]
  • 8.Royston P, Altman DG, Sauerbrei W. Dichotomizing continuous predictors in multiple regression: a bad idea. Stat Med 2006;25(1):127–41. doi: 10.1002/sim.2331. [DOI] [PubMed] [Google Scholar]
  • 9.Goldstein NPN, Frey SM, Fagnano M, Okelo SO, Halterman JS. Identifying Which Urban Children With Asthma Benefit Most From Clinician Prompting: Subgroup Analyses From the Prompting Asthma Intervention in Rochester-Uniting Parents and Providers (PAIR-UP) Trial. Acad Pediatr 2018;18(3):305–9. Epub 20170909. doi: 10.1016/j.acap.2017.08.015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Vandenbroucke JP, von Elm E, Altman DG, Gøtzsche PC, Mulrow CD, Pocock SJ, Poole C, Schlesselman JJ, Egger M. Strengthening the Reporting of Observational Studies in Epidemiology (STROBE): Explanation and elaboration. International Journal of Surgery. 2014;12(12):1500–24. doi: 10.1016/j.ijsu.2014.07.014. [DOI] [PubMed] [Google Scholar]
  • 11.McAteer JP, Ledbetter DJ, Goldin AB. Role of bottle feeding in the etiology of hypertrophic pyloric stenosis. JAMA Pediatr 2013;167(12):1143–9. doi: 10.1001/jamapediatrics.2013.2857. [DOI] [PubMed] [Google Scholar]
  • 12.Doyle LW, Halliday HL, Ehrenkranz RA, Davis PG, Sinclair JC. Impact of Postnatal Systemic Corticosteroids on Mortality and Cerebral Palsy in Preterm Infants: Effect Modification by Risk for Chronic Lung Disease. Pediatrics. 2005;115(3):655–61. doi: 10.1542/peds.2004-1238. [DOI] [PubMed] [Google Scholar]
  • 13.Froehlich TE, Lanphear BP, Auinger P, Hornung R, Epstein JN, Braun J, Kahn RS. Association of tobacco and lead exposures with attention-deficit/hyperactivity disorder. Pediatrics. 2009;124(6):e1054–63. Epub 2009/11/26. doi: 10.1542/peds.2009-0738. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Cotter JM, Florin TA, Moss A, Suresh K, Navanandan N, Ramgopal S, Shah SS, Ruddy R, Kempe A, Ambroggio L. Antibiotic use and outcomes among children hospitalized with suspected pneumonia. J Hosp Med 2022;17(12):975–83. Epub 20221115. doi: 10.1002/jhm.13002. [DOI] [PMC free article] [PubMed] [Google Scholar]

RESOURCES