STAT 350: Lecture 15
Another Extra Sum of Squares Example: two way layout
We have data for i from 1 to I, j from 1 to J and k from 1 to K where i labels the row effect, j labels the column effect and k labels the replicate. When K is more than 1 we generally check for interactions by comparing the additive model
to a saturated model in which the mean for the combination i,j is unrestricted. Thus the full model is
The additive model is not identifiable (that is, the design matrix is not of full rank) unless some conditions are imposed on the row effects and the column effects . A common restriction imposed is that the effects sum to 0; this restriction is then used to eliminate and from the model equations. The resulting design matrix then has 1+(I-1)+(J-1) = I+J-1 columns and looks like
(There are K copies of the first row for the observations in population i=1,j=1, then K copies of the row for observations in population i=1,j=2 and so on till we get to j=J. Elimination of produces -1's in the J-1 columns corresponding to the 's. Then we move to the JK rows corresponding to i=2 and so on with the last JK rows having -1's in the columns reflecting the identity .)
The full model is often reparametrized as
but the design matrix is actually much simpler for the first parametrization:
where there are K copies of the first row, and then K copies of and so on. There are a total of IJ columns and IJK rows.
It is not hard to find a matrix A such that
For instance the first column of A will be all 1's since this corresponds to adding the columns of together and this produces a column of 1's which is the first column of . To produce the second column of we have to add together the first I columns of and then subtract out the last I columns of . Thus the second column of A consists of I 1's followed by I(J-2) 0's followed by I -1's.