Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Mar-May;57(2-3):243-263.
doi: 10.1080/00273171.2020.1868966. Epub 2021 Feb 1.

Interpreting Interaction Effects in Generalized Linear Models of Nonlinear Probabilities and Counts

Affiliations

Interpreting Interaction Effects in Generalized Linear Models of Nonlinear Probabilities and Counts

Connor J McCabe et al. Multivariate Behav Res. 2022 Mar-May.

Abstract

Psychology research frequently involves the study of probabilities and counts. These are typically analyzed using generalized linear models (GLMs), which can produce these quantities via nonlinear transformation of model parameters. Interactions are central within many research applications of these models. To date, typical practice in evaluating interactions for probabilities or counts extends directly from linear approaches, in which evidence of an interaction effect is supported by using the product term coefficient between variables of interest. However, unlike linear models, interaction effects in GLMs describing probabilities and counts are not equal to product terms between predictor variables. Instead, interactions may be functions of the predictors of a model, requiring nontraditional approaches for interpreting these effects accurately. Here, we define interactions as change in a marginal effect of one variable as a function of change in another variable, and describe the use of partial derivatives and discrete differences for quantifying these effects. Using guidelines and simulated examples, we then use these approaches to describe how interaction effects should be estimated and interpreted for GLMs on probability and count scales. We conclude with an example using the Adolescent Brain Cognitive Development Study demonstrating how to correctly evaluate interaction effects in a logistic model.

Keywords: Generalized linear modeling; Poisson; interaction; logistic regression; moderation.

PubMed Disclaimer

Conflict of interest statement

Conflict of interest disclosures: Each author signed a form for disclosure of potential conflicts of interest. No authors reported any financial or other conflicts of interest in relation to the work described.

Figures

Figure 1.
Figure 1.
Logistic model regressing differing scales of a dependent variable on a predictor. Note. Gray areas indicate 95% confidence regions.
Figure 2.
Figure 2.
Poisson model regressing differing scales of a dependent variable on a predictor. Note. Gray areas indicate 95% confidence regions.
Figure 3.
Figure 3.
The relation between E^[Yx] and x1 across low, median, and high levels of x2 by biological sex.
Figure 4.
Figure 4.
Interaction between x1 and biological sex as a function of x1 plotted at low (below median) and high (above median) values of x2. Note. Black points indicate significant effects and gray points indicate non-significant effects at α = 0.05. This figure illustrates that the interaction effect between x1 and biological sex varied across observations, such that the effect was larger for observations with high values of the covariate x2. This highlights that the interaction effect (as well as its statistical significance) may be conditioned on predictors involved in the model. N.S. = Not Significant, Sig. = Significant.
Figure 5.
Figure 5.
The relation between E^[Yx] and x1 across low, median, and high levels of x2 in a logistic model. Note. This figure represents multiple interaction effects of opposite sign present within the data. We illustrate this is using one-unit rates of change. For instance, in describing one-unit rates of change, E^[Yx] increases by 0.037 as x1 increases from 1 to 2 when x2 is at the 75th percentile, but this increase is over 3 times larger (0.114) when examined at the 25th percentile of x2. In contrast, at the lower end of the x1 range, E^[Yx] increases by 0.160 units as x1 increases from −2 to −1 at the 75th percentile of x2, but the increase is smaller (0.111) at the 25th percentile of x2. This illustrates that interactions can have differing signs in the same model resulting from the nonlinear nature of the model.
Figure 6.
Figure 6.
The relation between E^[Yx] and x1 across low, median, and high levels of x2 in a Poisson model. Note. This figure represents the interaction effect in a Poisson model despite omission of a product term. For instance, the effect of a one-unit increase in x1 from 0 to 1 on E^[Yx] was greater at higher levels of x2 (0.023 at the 75th percentile of x2) compared to lower levels (0.006 at the 25th percentile of x2).
Figure 7.
Figure 7.
Empirical bias and mean squared error for γ^122 and β^12 as estimators of γ122 across conditions of β12. Note. Points represent values of each estimate averaged across 10,000 simulated datasets for each β12 condition.
Figure 8.
Figure 8.
Marginal effects of x1 plotted against different scalings of Y^ at low and high values of x2. Note. This figure illustrates how interaction effects can be of opposite sign depending on the scaling choice for inference. For instance, in the count scale (left-hand side), the curves presented are growing farther apart as x1 increases, indicating the synergistic interaction on the natural scale. By contrast, on the log-count scale (right hand side), the lines are coming closer together as x1 increases, indicating the antagonistic interaction on the transformed scale.
Figure 9.
Figure 9.
The relation between the predicted probability of alcohol sipping and parental monitoring across low, median, and high levels of school disengagement among Hispanic females by race. Note. Sc.Dis. = School Disengagement.

Similar articles

Cited by

References

    1. Agresti A (2002). Categorical data analysis. Wiley. 10.1002/0471249688 - DOI
    1. Ai C, & Norton EC (2003). Interaction terms in logit and probit models. Economics Letters, 80(1), 123–129. 10.1016/S0165-1765(03)00032-6 - DOI
    1. Aiken LS, & West SG (1991). Multiple regression: Testing and interpreting interactions. Sage.
    1. Alfaro ME, Zoller S, & Lutzoni F (2003). Bayes or bootstrap? A simulation study comparing the performance of bayesian markov chain Monte Carlo sampling and bootstrapping in assessing phylogenetic confidence. Molecular Biology and Evolution, 20(2), 255–266. 10.1093/molbev/msg028 - DOI - PubMed
    1. Armstrong D (2020). DAMisc: Dave Armstrong’s miscellaneous functions. R package version 1.5.4. https://CRAN.R-project.org/package=DAMisc

LinkOut - more resources