Professional Documents
Culture Documents
Contents
1.) Introduction
2.) Tukey's 1 d.f. test for interaction
3.) A SAS Macro for Tukey's 1 d.f. test
4.) Example
1.) Introduction
The classical randomized complete block design (RCBD) with t treatments in b blocks assumes
additivity of treatments and blocks. Contributions of block and treatment effects to the response are
independent and additive. The underlying statistical model is
yij = m + tx i + bl j + eij
where m is the grand mean, tx i the ith treatment effect, bl j the jth block effect, and eij is the
experimental error of treatment i in block b. An example with 4 fertilizer treatments in 2 blocks may
look like this:
Block 1
Block 2
Fert3
Fert2
Fert4
Fert1
Fert1
Fert4
Fert2
Fert3
Source
Degrees of Freedom
Block
(b-1)
Treatments
(t-1)
Exp. Error
(b-1)(t-1)
The degrees of freedom for experimental error are exactly the degrees of freedom one would expect
for a Block*Treatment interaction. A model augmented by interactions would be
yij = m + tx i + bl j +(tx*bl)ij + eij
The interaction term and the experimental error share the same subsripts and can not be separated.
In a RCBD the interaction between blocks and treatments serves as the experimental error source of
variability. Another explanation, why interaction can not be measured as in the previous model is
that in the classical RCBD every treatment appears exactly once in each block. In order to estimate
the variability stemming from interactions between blocks and treatments, one needs independent
replicates of the treatments within the blocks.
3) A SAS macro for RCBD analysis with Tukey's 1 d.f. test for interaction
The following SAS macro reads an input data set presumed to contain the information for a RCBD
analysis, creates the cross-product covariate and performs an RCBD analysis with and without
Tukey's test for interaction. The covariate testing the interaction is called NONADD. For simplicity
the variables in the input data set are renamed on the output as BLOCK and TX to denote block and
treatment effects generically.
The macro has four input parameters
denotes the input data set. It should contain a response, a variable identifying treatments, and
one variable identifying blocks
Y= denotes the response (the measured variable for which treatments are compared)
Tx= the variable identifying treatments
Block= the variable identifying blocks
data=
4) Example
The following example is borrowed from R. Kuehl (1994) Statistical Principles of Research Design
and Analysis, Duxbury Press, Belmont, CA
*/
*/
*/
*/
The experiment - described in detail on page 257 of Kuehl (1994) - contains t=6 fertilization
treatments in b=4 blocks. The measured response is wheat stem tissue nitrate amounts. To test for
interaction between blocks and treatments invoke the macro NonAdd (after it has been compiled)
%Nonadd(data=nitrogen,Y=nitrate,Tx=Treat,Block=Block);
DF
8
15
23
Sum of
Squares
398.320317
108.008417
506.328733
Mean
Square
49.790040
7.200561
F Value
6.91
Pr > F
0.0007
Source
BLOCK
TX
DF
3
5
Type III SS
197.003933
201.316383
Mean Square
65.667978
40.263277
F Value
9.12
5.59
Pr > F
0.0011
0.0042
BLOCK
TX
4
6
1 2 3 4
1 2 3 4 5 6
DF
9
14
23
Sum of
Squares
409.928414
96.400319
506.328733
Mean
Square
45.547602
6.885737
F Value
6.61
Pr > F
0.0010
Source
BLOCK
TX
NONADD
DF
3
5
1
Type III SS
197.003933
201.316383
11.608098
Mean Square
65.667978
40.263277
11.608098
F Value
9.54
5.85
1.69
Pr > F
0.0011
0.0040
0.2151
The test for non-additivity is non-significant with a p-value of 0.2151. The hypothesis that an
interaction of form k*(txi*blj ) exists, can not be rejected. Other types of interaction patterns may
needto be tested. Notice how the F- and associated p- value for the treatment variable changed
between the pure RCBD and the RCBD/Interaction analysis. Estimation of the interaction
parameter removes some variability from the error sums of squares but also depletes one degree of
freedom, while the treatment sum of squares is unchanged in both analyses.
This page is maintained by Oliver Schabenberger. For comments, click here .
Last updated: January 13, 1997
SAS is a registered trademark of SAS Institute, Inc., Cary, NC