Introduction to Randomized block designs
Accounting for predicted but random variance
Block 1 Block 2 Block 3 Block 4
C A A D B D B A
BD BC CA DC
Blocking
•Aim: – Reduce unexplained variation, without increasing size of experiment. Approach: – Group experimental units (“replicates”) into blocks. – Blocks usually spatial units, one experimental unit from each treatment in each block.
1 Walter & O’Dowd (1992)
• Effects of domatia (cavities on leaves) on number of mites • Two treatments (Factor A): – shaving domatia removes domatia from leaves – normal domatia as control • Required 14 leaves for each treatment
Completely randomized design: - 28 leaves randomly allocated to each of 2 treatments
Control leaves Shaved domatia leaves
2 Completely randomized ANOVA • Factor A with p groups (p = 2 for domatia) • n replicates within each group (n = 14 pairs of leaves)
Source general df example df
Factor A p-1 1 Residual p(n-1) 26
Total pn-1 27
Walter & O’Dowd (1992)
• Required 14 leaves for each treatment • Set up as blocked design – paired leaves (14 pairs) chosen – 1 leaf in each pair shaved, 1 leaf in each pair control
3 1 block
Control leaves Shaved domatia leaves
Rationale for blocking
• Micro-temperature, humidity, leaf age, etc. more similar within block than between blocks • Variation in response variable (mite number) between leaves within block (leaf pair) < variation between leaves between blocks
4 Rationale for blocking
• Some of unexplained (residual) variation in response variable from completely randomized design now explained by differences between blocks • More precise estimate of treatment effects than if leaves were chosen completely randomly
Null hypotheses
• No main effect of Factor A
–H0: 1 = 2 = … = i = ... =
–H0: 1 = 2 = … = i = ... = 0 (i = i - ) – no effect of shaving domatia, pooling blocks • Factor A usually fixed
5 Null hypotheses
• No effect of factor B (blocks): – no difference between blocks (leaf pairs), pooling treatments • Blocks usually random factor: – sample of blocks from population of blocks 2 –H0: = 0
Randomized blocks ANOVA
• Factor A with p groups (p = 2 treatments for domatia) • Factor B with q blocks (q = 14 pairs of leaves)
Source general example
Factor A p-1 1 Notice Factor B (blocks) q-1 13 that this Residual (p-1)(q-1) 13 is not Total pq-1 27 pq(n-1)
6 Randomized block ANOVA
• Randomized block ANOVA is 2 factor factorial design – BUT no replicates (n) within each cell (treatment-block combination), i.e. unreplicated 2 factor design – No measure of within-cell variation – No test for treatment by block interaction
Example – effect of watering on plant growth • Factor 1: Watering, no watering • Factor 2: Blocks (1-4). One replicate of each treatment (watering, no watering) in each of 4 plots • Replication: 1 plant for each watering/black combination (8 total)
No water Water
7 Results
15
Block Treatment Growth 10 1 No Water 6 1 Water 10 2 No Water 4 2 Water 6 Growth 3 No Water 11 3 Water 15 4 No Water 5 5 4 Water 8
0 No Water Water Treatment
Results
15.0
Block Treatment Growth 10.0 1 No Water 6 1 Water 10 2 No Water 4 h 2 Water 6 Growt 3 No Water 11 3 Water 15 4 No Water 5 5.0 4 Water 8
0.0 1.0 2.0 3.0 4.0 Block
8 Results
15 Treatment No Water Water
Block Treatment Growth 10 1 No Water 6 1 Water 10 2 No Water 4 2 Water 6 Growth 3 No Water 11 3 Water 15 4 No Water 5 5 4 Water 8
0 1.0 2.0 3.0 4.0 Block
Expected mean squares If factor A fixed and factor B (Blocks) random:
MSwatering
MSBlocks
MSResidual
9 2 2 2 EMSResidual = + : Why is this not simply
15 Treatment No Water Water
Block Treatment Growth 10 1 No Water 6 1 Water 10 2 No Water 4 2 Water 6 Growth 3 No Water 11 3 Water 15 4 No Water 5 5 4 Water 8
0 1.0 2.0 3.0 4.0 Block
Residual
2 2 • Cannot separately estimate and : – no replicates within each block-treatment combination 2 2 •MSResidual estimates +
10 Expected mean squares If factor A fixed and factor B (Blocks) random:
MSwatering
MSBlocks
2 2 MSResidual +
2 2 EMSBlocks = + n
15.0
Block Treatment Growth 10.0 1 No Water 6 1 Water 10 2 No Water 4 h 2 Water 6 Growt 3 No Water 11 3 Water 15 4 No Water 5 5.0 4 Water 8
0.0 1.0 2.0 3.0 4.0 Block
11 Expected mean squares If factor A fixed and factor B (Blocks) random:
MSwatering
2 2 MSBlocks + n
2 2 MSResidual +
2 2 2 EMSwatering= + + n (i) /p-1
15
Block Treatment Growth 10 1 No Water 6 1 Water 10 2 No Water 4 2 Water 6 Growth 3 No Water 11 3 Water 15 4 No Water 5 5 4 Water 8
0 No Water Water Treatment 2 Why does the EMS for watering include , which is the effect of the interaction? Block is a random effect, hence there are unsampled combinations of block and
watering that could affect the estimates of EMSwatering
12 Expected mean squares If factor A fixed and factor B (Blocks) random:
2 2 2 MSwatering + + n (i) /p-1
2 2 MSBlocks + n
2 2 MSResidual +
Testing null hypotheses
• Factor A fixed and blocks random
• If H0 no effects of factor A is true:
– then F-ratio MSA / MSResidual 1
• If H0 no variance among blocks is true: – no F-ratio for test unless no interaction assumed
– if blocks fixed, then F-ratio MSB / MSResidual 1
13 Walter & O’Dowd (1992)
• Factor A (treatment - shaved and unshaved domatia) - fixed • Blocks (14 pairs of leaves) - random
Source df MS FP
Treatment 1 31.34 11.32 0.005 Block 13 1.77 0.64 0.784 ?? Residual 13 2.77
Should this be reported??
Explanation Blocks Treatment 12345678910111213 Shaved1111111111111
Control1111111111111
Cells represent the possible effect of the Block by Treatment interaction but: 1) There is only one replicate per cell, therefore 2) No way to estimate variance term for each cell, therefore 3) No way to estimate the variance associated with the interaction, therefore 2 2 4) The residual term estimates +
14 Randomized Block vs Completely Randomized designs
• Total number of experimental units same in both designs – 28 leaves in total for domatia experiment
• Test of factor A (treatments) has fewer df in block design: – reduced power of test
RCB vs CR designs
•MSResidual smaller in block design if blocks explain some of variation in Y: – increased power of test
• If decrease in MSResidual (unexplained variation) outweighs loss of df, then block design is better: – when blocks explain much of variation in Y
15 Assumptions
• Normality of response variable – boxplots etc. • No interaction between blocks and factor A, otherwise
–MSResidual increase proportionally more than MSA with reduced power of F-ratio test for A (treatments) – interpretation of main effects may be difficult, just like replicated factorial ANOVA
Checks for interaction
• No real test because no within-cell variation measured • Tukey’s test for non-additivity: – detect some forms of interaction • Plot treatment values against block (“interaction plot”)
16 Interaction plots
Y No interaction
Y Interaction
Block
Growth of Plantago
17 Growth of Plantago
• Growth of five genotypes (3 fast, 2 slow) of Plantago major (ribwort) • Poorter et al. (1990) • One replicate seedling of each genotype placed in each of 7 plastic containers in growth chamber – Genotypes (1, 2, 3, 4, 5) are factor A – Containers (1 to 7) are blocks – Response variable is total plant weight (g) after 12 days
Poorter et al. (1990)
3 1 4 2 2 5 1 5 4 3
Container 1 Container 2
Similarly for containers 3, 4, 5, 6 and 7
18 Source df MS FP Genotype 4 0.125 3.81 0.016 Block 6 0.118 Residual 24 0.033 Total 34
Conclusions: • Large variation between containers (= blocks) so block design probably better than completely randomized design • Significant difference in growth between genotypes
Mussel recruitment and seastars
19 Mussel recruitment and seastars
• Effect of increased mussel (Mytilus spp.) recruitment on seastar numbers • Robles et al. (1995) – Two treatments: 30-40L of Mytilus (0.5-3.5cm long) added, no Mytilus added – Four matched pairs (blocks) of mussel beds chosen – Treatments randomly assigned to mussel beds within pair – Response variable % change in seastar numbers
- + +-
-+ - +
1 block (pair of mussel beds)
+ mussel bed with added mussels
- mussel bed without added mussels
20 Source df MS FP Blocks 3 62.82 Treatment 1 5237.21 45.50 0.007 Residual 3 115.09
Conclusions: • Relatively little variation between blocks so a completely randomized design probably better because treatments would have 1,6 df • Significant treatment effect - more seastars where mussels added
Worked Example – seastar colors
• Comparison of numbers of purple vs orange seastars along the CA coast • Data number of purple and orange seastars collected at 7 random locations • Compare models (block vs completely random vs paired t test)
sea star colors all sites two sample
21 Number of Seastars as a function of color and site
600 1000
500 800
400 600 300
400 200
100 200
0 0 Orange Purple
Color
Each error bar is constructed using 1 standard error from the mean. Site
Each error bar is constructed using 1 standard error from the mean. Any obvious problem with the data??
0.91 0.88 Diagnostics: Log transform helps normality and 0.84 0.8 homogeneity of variance assumptions
0.7
0.6 0.5 0.4
Normal Probability 0.3
0.2 0.16 0.12 0.09
0.07 Log Number 0 200 400 600 800 1000
Number
0.91 0.88 0.84 0.8
0.7 Number 0.6 0.5 0.4
Normal Probability 0.3
0.2 0.16 0.12 0.09 0.07 11.522.53
Log Number
22 Model 1: One factor ANOVA
Why the difference?
SE=0.181 2.5 SE=0.184
2
1.5
1
0.5
0 Orange Purple
Color
Each error bar is constructed using 1 standard error from the mean.
Model 2: Paired t test
• Accounts for site specific (block) differences • But no way to assess site (block) differences
3.5
3.0
2.5
e
u
l
a V 2.0
1.5
1.0 LORANGE LPURPLE Index of Case
23 Model 3: Randomized Block Design - using least squares
• Accounts for and assesses (with a caveat) site specific effects
Be careful Mean(Log Number) Mean(Log PSN Stair Boat Govpt Hazards 1) Compare to paired t (same p value for Color) but no Site effect Cayucos 2) Compare to single factor ANOVA (look at p-value for Color). Here Shell Beach tradeoff between df and partitioning of variance makes for a more powerful test
Any hint of Interaction (site*color)? If not then how does this change our interpretation of results?
If factor A fixed and factor B (Blocks) random:
2 2 2 MSA + + n (i) /p-1
2 2 MSBlocks + n
2 2 MSResidual +
3.5
3.0
R 2.5
E
B
M
U
N 2.0
L
1.5 COLOR Orange 1.0 Purple pt at ir s h s N v o ta rd ac co S o B S za e u P G a l B y H el Ca Sh SITE
24 Model 3: Randomized Block Design - using (restricted) Maximum Likelihood Estimation • Accounts for site specific effects
Identical to least squares solution
1) Variance component used to calculate percent of variance associated with the random effect 2) P-value for Color is identical to that from the Least Squares Estimation (this will always be true for balanced designs)
Model 3: Mixed Model Solution
• Also accounts for site specific effects
Identical to least squares solution and REML
25 Examples of randomized block designs • Effect of feeding time (pre, post) on metabolic rate in otters. Each otter is measured twice (pre post). Hence otter ID is the random effect unless???? • Effect of Health Care reform on percentage of insured people in counties of CA. Each county is measured twice (pre post). Hence county is the random effect unless?? • Effect of watering regime (0,1,2,4,6 times weekly in replicate plots). Each treatment (ttt) is in each of 10 plots. Plots are random effect. • Effect of gender on grades in replicated classrooms. Grades for males and females are measured in each of 20 classrooms. Classrooms (teachers) are a random effect unless??
Sphericity assumption
This is for reference – much more important for repeated measures
26 Block Treat 1 Treat 2 Treat 3 etc.
1 y11 y21 y31 2 y12 y22 y32 3 y13 y23 y33 etc.
Block T1 - T2 T2 - T3 T1 - T3 etc.
1 y11-y21 y21-y31 y11-y31 2 y12-y22 y22-y32 y12-y32 3 y13-y23 y23-y33 y13-y33 etc.
27 Sphericity assumption
• Pattern of variances and covariances within and between treatments: – sphericity of variance-covariance matrix • Equal variances of differences between all pairs of treatments : – variance of (T1 - T2)’s = variance of (T2 - T3)’s = variance of (T1 - T3)’s etc. • If assumption not met: – F-ratio test produces too many Type I errors
Sphericity assumption
• Applies to randomized block – also repeated measures designs • Epsilon () statistic indicates degree to which sphericity is not met – further is from 1, more variances of treatment differences are different • Two versions of – Greenhouse-Geisser – Huyhn-Feldt
28 Dealing with non-sphericity
If not close to 1 and sphericity not met, there are 2 approaches: – Adjusted ANOVA F-tests • df for F-ratio tests from ANOVA adjusted downwards (made more conservative) depending on value – Multivariate ANOVA (MANOVA) • treatments considered as multiple response variables in MANOVA
Sphericity assumption
• Assumption of sphericity probably OK for randomized block designs: – treatments randomly applied to experimental units within blocks • Assumption of sphericity probably also OK for repeated measures designs: – if order each “subject” receives each treatment is randomized (eg. rats and drugs)
29 Sphericity assumption
• Assumption of sphericity probably not OK for repeated measures designs involving time: – because response variable for times closer together more correlated than for times further apart – sphericity unlikely to be met – use Greenhouse-Geisser adjusted tests or MANOVA
30