Explanatory variables sometimes have interaction effects on an outcome variable that cannot be explained as the sum of their effects considered individually. For example, if income has a positive effect on happiness for some groups, and a negative effect on happiness for other groups, an interaction effect is said to exist between income and group membership. In the context of a model, an interaction term controls for this additional interaction effect.
To create an interaction term between two explanatory variables:
Interaction terms may be created between any two explanatory variables (category and non-category). If one of the explanatory variables is a category variable, multiple effects will be included in the model to represent all possible interactions. If both explanatory variables are non-category, creating an interaction term is equivalent to including the product of the two variables as a separate variable in the model.
See also: