Model for interaction

A linear model for two numerical factors, X and Z, can be written as:


yijk =  µ + 
(explained by X)
β xi

 + 
(explained by Z)
γ zj

 + 
(unexplained)
εijk

The simplest way to model an interaction between the effect of these two factors is to add a term involving the product of X and Z,


yijk =  µ + 
(explained by X)
β xi

 + 
(explained by Z)
γ zj

 + 
(interaction)
δ xizj

 + 
(unexplained)
εijk

To help understand this model, it can be rewritten in the form,

yijk   =   µ  +  (β + δzjxi   +  γ zj   +  εijk

In this form, it can be seen that the 'slope' for X depends on Z — the effect of changing x is different depending on the value of z. Similarly, writing the model as:

yijk   =   µ  +  β xi  +  (γ + δxjzj  +  εijk

it can be seen that the effect of changing z depends on the value of x.

Soybean and trace elements

The diagram below shows a no-interaction model for the yields of soybeans in an experiment that used four different applications of manganese (Mn) and four different applications of copper (Cu) in a factorial design with two replicates. Three red arrows allow the three parameters to be adjusted. Click Least squares to see the best-fitting model.

Click the checkbox Interaction and observe that a fourth green arrow appears in the diagram — there are four parameters and four degrees of freedom for the model with interaction. Drag the arrows to get a feel for the types of relationship that can be modelled.

Click Least squares to fit the model to the soybean data. Click y-z to rotate the model. Observe that the relationship of yield to Cu is no longer the same for all values of Mn. Indeed, the model predicts that increasing Cu will increase yield when Mn is high, but will decrease yield when Mn is low.

Analysis of variance

In the analysis of variance table above, drag the red arrow down to display the sums of squares explained by the main effects of the factors and their interaction. All three explained sums of squares have 1 degree of freedom since they each involve one parameter.

From the p-value associated with the interaction, we would conclude that there is strong evidence that the copper and manganese interact in their effects on soybean yield.