Day 2 · interactive
Interaction terms
An interaction means the effect of one predictor depends on the value of another. Drag the interaction coefficient and watch the same model change shape under four different views.
Things to try
- Set β3 = 0 and look at Lines: the lines are parallel. Parallel lines are what "no interaction" looks like. Now switch to Effect of x1 vs x2 and see that the effect line is flat.
- Push β3 positive. The lines fan apart: the effect of x1 grows as x2 grows. Push it negative and they cross. The slope of the "effect" view is β3.
- With β3 = 0, switch the link from identity to logit. The lines stop being parallel even though the interaction coefficient is still zero. This is the fourth lesson in the lab: "is there an interaction?" depends on the scale you look at.
- Switch to Contours. With no interaction the contour lines are parallel and straight; add an interaction and the surface twists into a saddle.