In ANOVA A simple setting in which interactions can arise is a
two-factor experiment analyzed using
Analysis of Variance (ANOVA). Suppose we have two binary factors
A and
B. For example, these factors might indicate whether either of two treatments were administered to a patient, with the treatments applied either singly, or in combination. We can then consider the average treatment response (e.g. the symptom levels following treatment) for each patient, as a function of the treatment combination that was administered. The following table shows one possible situation: In this example, there is no interaction between the two treatments — their effects are additive. The reason for this is that the difference in mean response between those subjects receiving treatment
A and those not receiving treatment
A is −2 regardless of whether treatment
B is administered (−2 = 4 − 6) or not (−2 = 5 − 7). Note that it automatically follows that the difference in mean response between those subjects receiving treatment
B and those not receiving treatment
B is the same regardless of whether treatment
A is administered (7 − 6 = 5 − 4). In contrast, if the following average responses are observed then there is an interaction between the treatments — their effects are not additive. Supposing that greater numbers correspond to a better response, in this situation treatment
B is helpful on average if the subject is not also receiving treatment
A, but is detrimental on average if given in combination with treatment
A. Treatment
A is helpful on average regardless of whether treatment
B is also administered, but it is more helpful in both absolute and relative terms if given alone, rather than in combination with treatment
B. Similar observations are made for this particular example in the next section.
Qualitative and quantitative interactions In many applications it is useful to distinguish between qualitative and quantitative interactions. A quantitative interaction between
A and
B is a situation where the magnitude of the effect of
B depends on the value of
A, but the direction of the effect of
B is constant for all
A. A qualitative interaction between
A and
B refers to a situation where both the magnitude and direction of each variable's effect can depend on the value of the other variable. The table of means on the left, below, shows a quantitative interaction — treatment
A is beneficial both when
B is given, and when
B is not given, but the benefit is greater when
B is not given (i.e. when
A is given alone). The table of means on the right shows a qualitative interaction.
A is harmful when
B is given, but it is beneficial when
B is not given. Note that the same interpretation would hold if we consider the benefit of
B based on whether
A is given. The distinction between qualitative and quantitative interactions depends on the order in which the variables are considered (in contrast, the property of additivity is invariant to the order of the variables). In the following table, if we focus on the effect of treatment
A, there is a quantitative interaction — giving treatment
A will improve the outcome on average regardless of whether treatment
B is or is not already being given (although the benefit is greater if treatment
A is given alone). However, if we focus on the effect of treatment
B, there is a qualitative interaction — giving treatment
B to a subject who is already receiving treatment
A will (on average) make things worse, whereas giving treatment
B to a subject who is not receiving treatment
A will improve the outcome on average.
Unit treatment additivity In its simplest form, the assumption of treatment unit additivity states that the observed response
yij from experimental unit
i when receiving treatment
j can be written as the sum
yij =
yi +
tj. This is so-called because a moderator is a variable that affects the strength of a relationship between two other variables.
Designed experiments Genichi Taguchi contended that interactions could be eliminated from a
system by appropriate choice of response variable and transformation. However
George Box and others have argued that this is not the case in general.
Model size Given
n predictors, the number of terms in a linear model that includes a constant, every predictor, and every possible interaction is \tbinom{n}{0} + \tbinom{n}{1} + \tbinom{n}{2} + \cdots + \tbinom{n}{n} = 2^n. Since this quantity grows exponentially, it readily becomes impractically large. One method to limit the size of the model is to limit the order of interactions. For example, if only two-way interactions are allowed, the number of terms becomes \tbinom{n}{0} + \tbinom{n}{1} + \tbinom{n}{2} = 1 + \tfrac{1}{2}n + \tfrac{1}{2}n^2. The below table shows the number of terms for each number of predictors and maximum order of interaction.
In regression The most general approach to modeling interaction effects involves regression, starting from the elementary version given above: :Y = c + ax_1 + bx_2 + d(x_1\times x_2) + \text{error} \, where the interaction term (x_1\times x_2) could be formed explicitly by multiplying two (or more) variables, or implicitly using factorial notation in modern statistical packages such as
Stata. The components
x1 and
x2 might be measurements or {0,1}
dummy variables in any combination. Interactions involving a dummy variable multiplied by a measurement variable are termed
slope dummy variables, because they estimate and test the difference in slopes between groups 0 and 1. When measurement variables are employed in interactions, it is often desirable to work with centered versions, where the variable's mean (or some other reasonably central value) is set as zero. Centering can make the main effects in interaction models more interpretable, as it reduces the
multicollinearity between the interaction term and the main effects. The coefficient
a in the equation above, for example, represents the effect of
x1 when
x2 equals zero. Regression approaches to interaction modeling are very general because they can accommodate additional predictors, and many alternative specifications or estimation strategies beyond
ordinary least squares.
Robust,
quantile, and mixed-effects (
multilevel) models are among the possibilities, as is
generalized linear modeling encompassing a wide range of categorical, ordered, counted or otherwise limited dependent variables. The graph depicts an education*politics interaction, from a probability-weighted
logit regression analysis of survey data. ==Interaction plots==