3a.2 - Cell Means Model

To run the cell means model, wherein we don’t fit an overall mean, but instead fit an individual mean for each of the treatment levels, we simply replace the design matrix in the IML code with:

/* The Cell Means Model */
x={
1	0	0,
1	0	0,
0	1	0,
0	1	0,
0	0	1,
0	0	1};
 

Each column is using indicator coding, a ‘1’ for the treatment, and 0 for other. So column 1 will generate the mean for treatment level1, column 2 for treatment level2, and column 3 for treatment level3.

We then re-run the program with the new design matrix to get the following output:

Regression Coefficients
Beta_0 1.5
Beta_1 3.5
Beta_2 5.5
ANOVA
  df SS MS F
Treatment 2 16 8 16
Error 3 1.5 0.5  
Total 5 17.5    

We can see that the regression coefficients are now the means for each treatment level, and in the ANOVA table we see that the \(SS_{Error}\) is 1.5. This reduction in the \(SS_{Error}\) is the \(SS_{treatmemt}\).

Internally, we have:

xprimex
2 0 0
0 2 0
0 0 2
check
1 0 0
0 1 0
0 0 1
xprimey
3
7
11
SumY2
89.5
CF
73.5
xprimexinv
0.5 0 0
0 0.5 0
0 0 0.5

Here we can see that \(\mathbf{X}^{'}\mathbf{X}\) now contains diagonal elements that are the \(n_i\) = number of observations for each treatment level mean being computed. In addition, we can verify that the ‘working formula’ \(CF = \Sigma Y^2 - CF = 16\), the treatment SS.

We can now test for the significance of the treatment by using the General Linear F test:

 See Textbook: Section 16.7

\(F=\dfrac{SSE_{reduced} - SSE_{full}/dfE_{reduced} - dfE_{full}}{SSE_{full} / dfE_{full}}\)

The Overall Mean model is the ‘Reduced’ model, and the Cell Means model is the ‘Full’ model. From the ANOVA tables, we get:

\(F=\dfrac{17.5-1.5⁄5-3}{1.5⁄3}=16\)

which can be compared to \(F_{.05,2,3}=9.55\).