abn
y
C
3) Total (corrected) sum of squares:
SSTOT = ijk(yijk)2 C = 8262 + 8062 + .+ 8352 = 15775768 15723728.17
=
= 52039.83
4) Treatment sum of squares:
i j k ijk
()
15723728.17 8025.58
8
6279
8
6517
8
6630
222
2
= = + + = C
nb
y
SS
i
j k ijk
TRT
5) Blo
=
where
a
MS MS
BLK
RES
BLK
= is the estimate of the variance component for blocks.
For both fixed and random blocks, the standard errors of estimators of
the differences
between treatment means are:
= nb
s MS
2
2
yi yi
RES
. ' .
Standard errors of estim
C
nb
y
SS
i
j k ijk
=
5) Block sum of squares:
TRT
2
()
C
na
y
SS
j
i k ijk
=
6) Interaction sum of squares:
BLK
2
()
SS SS C
n
y
SS
i j TRT BLK
k ijk
=
7) Residual sum of squares:
SSRES = SSTOT SSTRT SSBLK SSTRT x BLK
Dividing sums of squares by appro
6
4785
2222
2
= = + + + = C
na
y
SS
j
i k ijk
BLK
286 Biostatistics for Animal Science
6) Interaction sum of squares:
()
= = SS SS C
n
y
SS
i j TRT BLK
k ijk
TRTxBLK
2
( ) ( ) ( ) 802558 33816 83 1572372817 8087 42
2
. 820 835
2
864 871
2
826 806
.=.
+
+
SS
j
i ij k
COL
=
2
()
6) Treatment sum of squares:
()
C
r
y
SS
k
i j ij k
=
TRT
2
()
7) Residual sum of squares:
SSRES = SSTOT SSROW SSCOL SSTRT
Dividing the sums of squares by their corresponding degrees of freedom
yields the
following mean squares:
M
n
y
SS
i
i
j ij
TRT
=
7892652 6536
4
3116
4
3280
4
3336
=+=
5) Block sum of squares:
2
222
()
C
n
y
SS
j
j
i ij
=
7892652 18198
3
2532
3
2253
3
2541
3
BLK
2
TRT
MS
MS
1
2
2
2
+
a
b
jj
TRT x BLK
TRT x BLK
TRT
MS
MS
Trt x Block
()
( 1)( 1)
2
2
+
ab
b
i j ij
RES
TRT x BLK
MS
MS
2
2
TRT x BLK
+
RES
TRT x BLK
MS
MS
Residual
2
2
BLK
and
2
: Compute the efficiency of using randomized block design instead
of completely
randomized design.
Recall from chapter 12 the efficiency of two experimental designs can
be compared by
calculating the relative efficiency (RE) of design 2 to design 1 (desig
of 12 animals were used. The identification numbers were assigned to
steers in the
following manner:
Block Animal number
I 1,2,3
II 4,5,6,
III 7,8,9
IV 10,11,12
In each block the treatments were randomly assigned to steers.
Block
I II III IV
No. 1 (T3) No
CLASS statement defines the categorical (class) variables. The MODEL
statement defines
d_gain as the dependent, and block and trt as the independent variables.
Also, the block*trt
interaction is defined. The LSMEANS statement calculates least squares
mean
1 T2 T1 T2 T3
2 T1 T3 T3 T2
3 T3 T2 T1 T1
Note that an experimental unit is not the subject or animal, but one
measurement on the
subject. In effect, subjects can be considered as blocks, and the model is
similar to a
randomized block design model, with t
an estimator of the population variance. For an level of significance H0
is rejected if
F > F,(a-1),(a-1)(b-1), that is, if the calculated F from the sample is greater than
the critical
value. The test for blocks is usually not of primary interest, but ca
Fcrit=FINV(1-alpha,df1,df2);
power=1-PROBF(Fcrit,df1,df2,lambda);
OUTPUT;
END;
RUN;
PROC PRINT DATA=a (OBS=1 );
WHERE power > .80;
VAR alpha df1 df2 n power;
RUN;
The statement, DO n = 2 to 50; indicates computation of the
power for 2 to
50 replications.
= +
SS y y y y y ( . . 2 .)
The sum of squares can be calculated with a short cut computation:
1) Total sum:
i j yij(k)
2) Correction factor for the mean:
RES i j
ij
i
j
k
2
()
2
2
()
r
y
C
i j ij k
=
Chapter 14 Change-over Designs 303
3) Total (correcte
1347.90
4012.79 = 2.98. This ratio is not large thus although there is an
effect of treatment compared to residual error, this effect is not large
compared to the
interaction. Thus, the effect of this treatment is likely to differ depending
on the initial
+
+
+
+
RE =
Since RE is much greater than one, the randomized block plan is better
than the completely
randomized design for this experiment.
Chapter 13 Blocking 279
13.1.3 SAS Example for Block Design
The SAS program for the example of average dai
292 Biostatistics for Animal Science
Using the noncentral F distribution with 2 and 12 degrees of freedom
and the noncentrality
parameter = 10.68, the power is 0.608. The power for blocks can be
calculated in a similar
manner, but is usually not of primar
MS SS
BLK
BLK
Mean square for treatments:
1
=
a
MS SS
TRT
TRT
Mean square for residual:
( 1) ( 1)
=
ab
MS SS
RES
RES
13.1.2 Hypotheses Test - F test
The hypotheses of interest are to determine if there are treatment
differences. The null
hypothesis H0 and
2. The treatments are assigned to units in each block randomly.
This design is balanced, each experimental unit is grouped according to
blocks and
treatments, and there is the same number of blocks for each treatment.
Data obtained from
this design are an
combination. Consider again a treatments and b blocks, but with n
experimental units per
treatment x block combination. Thus, the number of experimental units
within each block is
(n a). Treatments are randomly assigned to those (n a) experimental
units i
Power = P (F > F,df1,df2 = F)
using a noncentral F distribution for H1. Here, is the level of
significance, df1 and df2 are
degrees of freedom for treatment and residual, respectively, and F,df1,df2 is
the critical value.
13.3.1 SAS Example for Calculatin
SSTOT = SSTRT + SSBLK + SSTRT x BLK + SSRES
282 Biostatistics for Animal Science
The corresponding degrees of freedom are:
(abn 1) = (a 1) + (b 1) + (a 1)(b 1) + ab(n 1)
The sums of squares are:
=
SS y y ( .)
= =
SS y y bn y y ( . .) ( . .)
= =
SS y y
Parameter Estimates) and F tests for fixed effects (Type 3 Test of Fixed
Effects). In the table
titled Least Squares Means are Estimates with Standard Errors. In the
table Differences of
Least Squares Means are listed the differences between all possible
y232
y241
y242
T y311
y312
y321
y322
y331
y332
y341
y342
Here, y111, y121,., y342, or generally yijk denotes experimental unit k in
treatment i and
block j.
The statistical model is:
yijk = + i + j + ij + ijk i = 1,.,a; j = 1,.,b; k = 1,n
where:
yijk = ob
1
df s
df
df s
RE df
defining the completely randomized design as design 1, and the
randomized block design as
design 2; s2
1 and s2
2 are experimental error mean squares, and df1 and df2 are the error
degrees of freedom for the completely randomized desi
df2,lambda) the function PROBF(Fcrit,df1,df2,lambda) can be used.
The PRINT procedure
gives the following SAS output:
alpha df1 df2 sstrt mse lambda Fcrit power
0.05 2 6 6536 612 10.6797 5.14325 0.60837
Thus, the power is 0.608.
Chapter 13 Blocking 293
Ex
SS y y a y y ( . .) ( . .)
= +
SS y y y y ( . . .)
The sums of squares can be computed using a short-cut computation:
BLK i j
RES i j
j
ij
i
i
j
j
2
2
2
Chapter 13 Blocking 275
1) Total sum:
i j yij
2) Correction for the mean:
()
( )( )
()
total number of
= Sum of ( )
no. of observations in treatment
treatment sum
for each
treatment minus C
Note that the number of observations in a treatment is equal to the
number of blocks.
5) Block sum of squares:
2
()
C
a
y
SS
j
i ij
=
= Sum of ( )
no. of observations
means and sums are shown in the following table:
Blocks
I II III IV
treatments
Treatment
means
T1 826 865 795 850 3336 834
T2 827 872 721 860 3280 820
T3 753 804 737 822 3116 779
blocks
2406 2541 2253 2532 9732
Block means 802 847 751 844 811
Short-cut co