Defining models directly with terms

The most general model for the effect of two factors with interaction is usually written in the form


yijk  =  µ

 + 
(explained by X)
βi

 + 
(explained by Z)
γj

 + 
(interaction)
δij

 + 
(unexplained)
εijk

where yijk is the response from the k'th of the replicate observations with factor X at level i and factor Z at level j. When written in this way,

The important special cases where there is no interaction, no main effect for X and no main effect for Z all correspond to adding or deleting terms.

Defining models with constraints

An alternative way to define models places constraints on the allowable parameters, µij, of the most general model, when it is written in the form


yijk  =
(explained by X & Z)
µij

 + 
(unexplained)
εijk

It is not particularly difficult to specify the constraints on the µij to define models without interaction and without main effects for X and Z, but we will only give details for the simplest situation in which X and Z only two levels.

Alternative definitions of models for factors with two levels

If the factors each have two levels, the mean responses for the four combinations of factor levels are:

  Factor X
Factor Z     Level 1         Level 2       Total  
Level 1 µ11 µ21 µ11 + µ21
Level 2 µ12 µ22 µ12 + µ22
Total µ11 + µ12 µ21 + µ22

The diagram below shows how some of the important models can be defined by:


Neither factor affects Y
yijk   =   µ   +   εijk
add term βi   Constrain µ11 + µ12 = µ21 + µ22
(The total of the response means is the same when X has level 1 and level 2)
Only factor X affects Y
add term γj   Constrain µ11 + µ21 = µ12 + µ22
(The total of the response means is the same when Z has level 1 and level 2)
Factors X and Z affect Y without interaction
add term δij   Constrain µ21 - µ11 = µ22 - µ12
(Changing X from level 1 to 2 has same effect when Z = 1 as when Z = 2)
Factors X and Z interact in how they affect Y
yijk   =   µij   +   εijk

Although nothing has been gained by the use of constraints to define these important models,

The idea of defining special cases of models using linear constraints will be used to answer other questions in the following pages.


Effect of fertiliser on two varieties of maize

Consider the following experimental data about the yield of maize in plots where two types of fertiliser and two maize varieties were randomly allocated.

Yield of maize
  Fertiliser A
  on variety V1   
  Fertiliser B
  on variety V1  
Fertiliser A
  on variety V2  
  Fertiliser B
  on variety V2  
9.71
11.51
9.81
10.24
8.91
13.79
13.29
13.72
11.70
12.42
13.29
13.32
15.04
12.40
12.95
14.09
13.73
16.54
13.48
14.39

The diagram below initially shows the mean yield for each of the four treatments — the parameter estimates for the most general model allowing interaction between the fertiliser and variety.

Click the checkbox on the right to apply a constraint to the parameters that removes the interaction between fertiliser and variety. Note that the difference between the estimated mean yields for fertilisers A and B is now the same for varieties V1 and V2.

The two checkboxes on the left can be used to impose further constraints that remove the main effects for the fertilisers and the varieties.