Interactions
◮ If a model contains terms βuU + βvV then UV interaction
term is βuvUV — new column of design matrix which is product of U column and V column.
◮ Analogue if one variable (or both) categorical: ◮ Factor at K levels has K − 1 columns in design matrix. ◮ Create interaction between this factor and continuous variable
X by adding K − 1 new columns — multiply X column by each of the K − 1 columns.
◮ Create an interaction between factor at K1 levels and another
at K2 levels: multiply each of K1 − 1 columns corresponding to the first factor by each of K2 − 1 columns of second factor.
◮ Three way interactions: multiply columns corresponding to 3
covariates, and so on for higher way interactions.
◮ Interaction term between continuous covariate and categorical
factor allows slope for continuous covariate to depend on level
- f categorical factor.
Richard Lockhart STAT 350: Interaction Effects