Explained sums of squares

Testing whether there is any interaction between two factors, X and Z, is done in a similar way to the tests for significance of the main effects for the factors and is based on the sums of squares explained by adding terms to models.

The following diagram extends a diagram that was shown earlier by adding a final model with an interaction term.

Neither X nor Z affects Y
yijk  =  µ   +  εijk
 
Only X affects Y
yijk  =  µ   +   βi  +   εijk
  Only Z affects Y
yijk  =  µ   +  γj   +   εijk
 
X and Z affect Y with no interaction
yijk  =  µ   +   βi   +   γj   +   εijk
X and Z affect Y with interaction
yijk  =  µ   +   βi   +   γj   +   δij   +   εijk

Each arrow corresponds to adding a term to the model and reduces the residual sum of squares.

The reductions in the residual sum of squares are explained sums of squares.

The sum of squares explained by the interaction term is used to test to test whether the two factors interact in their effect on the response.

Alternative interpretation of the interaction sums of squares

The interaction sum of squares has been defined as the difference between the residual sums of squares for the models with only the main effects for the factors and with these plus an interaction term.

Adding the interaction term changes the fitted values for each combination of factor levels (when the parameters are estimated by least squares) — after adding the interaction term, they become closer to the response measurements.

The interaction sum of squares also equals the sum of squared changes to the fitted values when the interaction term is added.


Bait Acceptability by Feral Pigs

The five possible models are shown on the top right of the diagram. Click the arrow linking the no-factor model to the model with only the factor Gender. The thick red lines are the changes to the fitted values when Gender is added to the model, and the sum of the squares of these changes is the sum of squares explained by the main effect Gender.

Clicking other blue arrows shows the other explained sums of squares in the model. Note that, since there are equal numbers of replicates for all factor combinations,

  • The sum of squares explained by Gender is the same whether or not Feed is already in the model.
  • The sum of squares explained by Feed is the same whether or not Gender is already in the model.

Now click the bottom arrow corresponding to addition of the interaction term. The coloured grid on the 3-dimensional scatterplot on the left alternates between the models with and without the interaction term (but with main effect terms for Gender and Feed). The thick red lines show the changes to the fitted values and their sum of squares is the interaction sum of squares.