# Creating an interaction term in a model

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:

1. In the Model view, select one of the explanatory variables for which you wish to create an interaction term
2. Choose Model > Explanatory Variable > Interact With Variable, and select the other explanatory variable

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:

- Including higher-order terms of a numeric explanatory variable in a model
- Performing a two-way ANOVA test of a numeric column’s mean across values of two other columns
- Treating an explanatory variable as categorical data
- Creating an interaction term between two or more category columns
- About models

Back to Wizard Help