Professional Documents
Culture Documents
Lec24 PDF
Lec24 PDF
Lec24 PDF
RCBD model
response ∼ treatment + block + error
Block
Treatment 1 2 3 4 Mean (ȳj· )
Control 86 90 88 87 87.75
Arasan 98 94 93 89 93.50
Spergon 96 90 91 92 92.25
Semesan 97 95 91 92 93.75
Fermate 91 93 95 95 93.50
Mean (ȳ·k ) 93.6 92.4 91.6 91.0 ȳ·· = 92.15
Model:
Block
Trt 1 2 ··· b µ̄j·
1 µ + α1 + β1 µ + α1 + β2 µ + α1 + βb µ + α1
2 µ + α2 + β1 µ + α2 + β2 µ + α2 + βb µ + α2
··· ··· ···
a µ + αa + β1 µ + αa + β2 µ + αa + βb µ + αa
µ̄·k µ + β1 µ + β2 µ + βb µ
MSBlk − MSErr
Estimation, if random block effects: σ̂β2 =
a
ANOVA table
MSBlk
F = on df = b − 1, (b − 1)(a − 1)
MSErr
but even if there appears to be non-significant differences
between blocks, we would keep blocks into the model, to reflect
the randomization procedure.
MSTrt
F = ∼ Fa−1, (b−1)(a−1) ANOVA table
MSErr
Source df SS MS F p-value
Treatments 4 102.30 25.58 3.598 0.038
Blocks 3 18.95 6.32 0.889 0.47
Error 12 85.30 7.11
Total 19 206.55
ANOVA in R with RCBD
> drop1(fit.lm)
Single term deletions
Df Sum of Sq RSS AIC F value Pr(F)
<none> 85.30 45.009
block 3 18.95 104.25 43.021 0.8886 0.47480
treatment 4 102.30 187.60 52.772 3.5979 0.03775 *
ANOVA in R with RCBD
B A C
D A B
C B D
A C D
Model diagnostics
Check that residuals (ri = yi − ŷi ):
approximately have a normal distribution,
no pattern (trend, unequal variance) across blocks.
no pattern (trend, unequal variance) across treatments.
plot(fit.lm)
Constant Leverage:
Residuals vs Fitted Normal Q−Q Residuals vs Factor Levels
● ● ●
● ● ●
● ● ●
Standardized residuals
Standardized residuals
1
● ● ● ●
2
1
● ● ● ●
●
● ● ● ●
● ● ●
●●
Residuals
● ● ● ●
● ●● ●
0
0
●
0
● ● ● ● ● ●
●●●
−2
−1
● ●
−1
● ● ●
●
●1 ●1
17 ● 17 ●
17 ● 1 ●
−4
5● ●5
−2
●5
−2
88 90 92 94 −2 −1 0 1 2 block 4: 3 2 1
Fitted values Theoretical Quantiles Factor Level Combinations
with(emerge,
interaction.plot(treatment,block,emergence, col=1:4) )
86 88 90 92 94 96 98
86 88 90 92 94 96 98
block treatment
mean of emergence
mean of emergence
1 Fermate
4 Semesan
3 Spergon
2 Arasan
Control
B B D D A C C block
slope
B D A A C
Source df SS MS IE(MS)
Pb
βk2
Blocks b−1 SSBlk MSBlk σe2 + sσδ2 + as j=1
Pb−1
a 2
j=1 αj
Treatment a−1 SSTrt MSTrt σe2 + sσδ2 + bs a−1
Plot Error (a − 1)(b − 1) SSPE MSPE σe2 + sσδ2
Subsamp. ab(s − 1) SSSSE MSSSE σe2
Total abs − 1 SSTot
Plot effects take same # of df as an interaction
block:treatment would.
To test H0 : αj = 0 for all j (i.e., no treatment effect), use the
fact that under H0 ,
MSTrt
F = ∼ Fa−1, (b−1)(a−1) .
MSPE
ANOVA table and f-test, RCBD with subsampling
3 Randomly arrange the rows, except for the first one. For
example, in R,
> sample(2:3);
[1] 3 2
Model for the Latin square design
where
µ is a population mean, averaged over treatments
αj is a fixed trt effect (irrigation) constrained to aj=1 αj = 0
P
Source df SS MS
Row a−1 SSRow MSRow
Column a−1 SSCol MSCol
Treatment a−1 SSTrt MSTrt
Error (a − 1)(a − 2) SSErr MSErr
Total a2 − 1 SSTot
To test H0 : αj = 0 for all j (i.e., no trt effect) use the fact that
under H0 ,
MSTrt
F = ∼ Fa−1,(a−1)(a−2)
MSErr
Column
Row 1 2 3 4 5 Mean
1 B: 253 E: 226 A: 285 C: 283 D: 188 247.0
2 D: 255 A: 293 E: 265 B: 290 C: 260 272.6
3 E: 190 B: 260 C: 298 D: 254 A: 248 250.0
4 A: 203 C: 204 D: 237 E: 193 B: 249 217.2
5 C: 230 D: 270 B: 275 A: 333 E: 327 287.0
Mean 226.2 250.6 272.0 270.6 254.4 254.76
Treatment: A B C D E
Mean (Ȳi·· ): 272.4 265.4 255.0 240.8 240.2
Millet example with R
Because of balance: the type I and type III SS are equal: the
results (F and p-values) do not depend on the order.
Latin square design: notes
Model:
Y = treatment + square + square:row + square:column + error
where
j = 1, . . . , a indexes treatment
h = 1, . . . , m indexes square (here: )
k = 1, . . . , a indexes row within square ( )
l = 1, . . . , a indexes column within square ( )
ANOVA table for multiple Latin square design
Source df SS
Square m−1 SSSq
Row m(a − 1) SSRow
Column m(a − 1) SSCol
Treatment a−1 SSTrt
Error m(a − 1)(a − 2) + (m − 1)(a − 1) SSErr
Total ma2 − 1 SSTot
To test H0 : αj = 0 for all j (i.e., no trt effect) use the fact that
under H0 ,
MSTrt
F = ∼ Fa−1, m(a−1)(a−2)+(m−1)(a−1) .
MSErr