Bailey (2008) Design of Comparative Experiments.
It's important to think of the whole experiment holistically at each stage.
Bailey (2008) Design of Comparative Experiments.
The key to a statistically efficient design is optimisation in terms of providing a valid framework, with sufficient power using the resources available and accommodating the practical constraints.
Reference for next two slides: Broman & Woo (2018) Data Organization in Spreadsheets. The American Statistician 72(1) 2-10
You need to have an idea of how you will analyse it before you have the data.
Example: Potato scab infection with sulfur treatments. The experiment is conducted to investigate the effect of sulfur on controlling scab disease in potatoes. There were seven treatments. Control, plus spring and fall application of 300, 600, 1200 lbs/acre of sulfur. The infection as a percent of the surface area covered with scab will be measured. There are 8 replication of control and 4 replications of other treatments. Treatments are randomised within rows.
Description based on cochran.crd
from agridat
.
fit <- asreml(inf ~ trt, random=~row) fit <- lmer(inf ~ trt + (1|row)) #lme4fit <- aov(inf ~ trt + Error(row)) #aov
Your analysis may change as you may find other trends or sources of variation in the data but there should be a plan of the analysis before conducting the experiment.
Bailey (2008) Design of Comparative Experiments.
Different varieties of tomato are grown in pots, with different composts and different amounts of water. Each plant is supported on a vertical stick until it is 1.5 metres high, then all further new growth is wound around a horizontal rail (within the same pot). Groups of five adjacent plants are wound around the same rail. When the tomatoes are ripe they are harvested and the weight of saleable tomatoes per rail is recorded.
Blocks are to divide the set of EUs into alike units.
Increasing the replication generally increase the power but also generally increase the cost of the experiment.
In life-sciences, it is often important to make a distinction between technical and biological replication.
Two controlled cabinets, one at 10oC and one at 20oC, each containing eight seed trays, with different watering regimes (A and B) each applied to four trays chosen at random within each cabinet. The average growth of the seedlings in each tray are measured.
Two controlled cabinets, one at 10oC and one at 20oC, each containing eight seed trays, with different watering regimes (A and B) each applied to four trays chosen at random within each cabinet. The average growth of the seedlings in each tray are measured.
summary(aov(Length ~ Temp*Water + Error(Cabinet/Tray), data=dat))
Error: Cabinet Df Sum Sq Mean Sq Temp 1 115 115 Error: Cabinet:Tray Df Sum Sq Mean Sq F value Pr(>F) Water 1 152.07 152.07 39.128 4.22e-05 *** Temp:Water 1 2.54 2.54 0.654 0.435 Residuals 12 46.64 3.89 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The temperature treatment is unreplicated and there is no residual degrees of freedom for the cabinet stratum.
Two controlled cabinets, one at 10oC and one at 20oC, each containing eight seed trays, with different watering regimes (A and B) each applied to four trays chosen at random within each cabinet. The average growth of the seedlings in each tray are measured. The experiment was repeated with another two controlled cabinets.
summary(aov(Length ~ Temp*Water + Error(Experiment/Cabinet/Tray), data=dat))
Error: Experiment Df Sum Sq Mean Sq F value Pr(>F) Residuals 1 49.93 49.93 Error: Experiment:Cabinet Df Sum Sq Mean Sq F value Pr(>F) Temp 1 203.91 203.91 259.5 0.0395 * Residuals 1 0.79 0.79 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Error: Experiment:Cabinet:Tray Df Sum Sq Mean Sq F value Pr(>F) Water 1 306.34 306.34 86.055 9.89e-10 *** Temp:Water 1 4.69 4.69 1.317 0.262 Residuals 26 92.56 3.56 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Treatments are randomly applied to the experimental units.
You can use R. E.g. 3 treatment with 2 replication:
des <- expand.grid(Unit=1:3, Block=1:2)set.seed(1) # arbitrary number; sample from same random instancedes$Trt <- as.vector(replicate(2, sample(c("A", "B", "C"))))des
## Unit Block Trt## 1 1 1 A## 2 2 1 C## 3 3 1 B## 4 1 2 C## 5 2 2 A## 6 3 2 B
Bias, bias, bias...
Caution: an experimental design should be tailored to the experiment rather than selecting a named design without much consideration of the experiment.
asreml(y ~ trt, random=~block)
Most designs used in practice (at least in Australia) are incomplete.
Lattice square design is a square array with two blocking factors that are perpendicular to each other.
Cochran and Cox (1957) Experimental Designs, 2nd ed., Wiley and Sons, New York.
K. Ryder (1981). Field plans: why the biometrician finds them useful. Experimental Agriculture 17 243–256
Data: Cullis et al. (1989). A New Procedure for the Analysis of Early Generation Variety Trials. Journal of the Royal Statistical Society. Series C (Applied Statistics) 38 361-375
Design: Kempton (1982) The design and analysis of unreplicated field trials. Vorträge für Pflanzenzüchtung 7 219-242
Cullis et al. (2006) On the design of early generation variety trials with correlated data. Journal of Agricultural, Biological, and Environmental Statistics 11(4) 381-393
Butler (2013) On The Optimal Design of Experiments Under the Linear Mixed Model. PhD Thesis
template <- expand.grid(Row=1:4, Column=1:8) %>% mutate( Block=case_when( Column %in% 1:2 ~ 1, Column %in% 3:4 ~ 2, Column %in% 5:6 ~ 3, Column %in% 7:8 ~ 4), Trt=rep(LETTERS[1:8], times=4)) %>% mutate_all(as.factor)
od
library(od)sv <- od(fixed=~Trt, random=~ Block + Row + Column, permute=~Trt, swap=~Block, data=template, start.values=T)sapply(sv$G.param, function(x) x$variance$initial)
Block.Block Row.Row Column.Column 0.1 0.1 0.1
These values can be modified as you see fit.
des <- od(fixed=~Trt, random=~Block + Row + Column, permute=~Trt, G.param=sv$G.param, swap=~Block, data=template, search="random", maxit=10000)
Initial A-value = 0.700000 (8 A-equations; rank C 7) Final A-value after 10000 iterations: 0.521978 Done optimise; elapsed = 0.32
The randomised treatment is contained in
des$design
Row Column Block Trt 1 1 1 1 F 2 2 1 1 E 3 3 1 1 H 4 4 1 1 C 5 1 2 1 D 6 2 2 1 G 7 3 2 1 A 8 4 2 1 B 9 1 3 2 C 10 2 3 2 F 11 3 3 2 G 12 4 3 2 D 13 1 4 2 E 14 2 4 2 H 15 3 4 2 B 16 4 4 2 A 17 1 5 3 G 18 2 5 3 A 19 3 5 3 F 20 4 5 3 H 21 1 6 3 B 22 2 6 3 C 23 3 6 3 D 24 4 6 3 E 25 1 7 4 H 26 2 7 4 B 27 3 7 4 C 28 4 7 4 G 29 1 8 4 A 30 2 8 4 D 31 3 8 4 E 32 4 8 4 F
random
tabu
od
is the tabu
. search="random"
with search="tabu"
.des <- od(fixed=~1, random=~vm(Geno, Ainv) + ide(Geno) + Block + Row + Column, data=dat, permute=~Geno, optimize="ginv", search="tabu", maxit=30, G.param=sv$G.param)
optimize="ginv"
means that it optimizes for additive effect. optimize="data"
means that it optimizes for total genetic effect. od
version 2 is using asreml
-R version 4 notation while od
version 1 is aligned more with asreml
-R version 3.od
is a new package and should be considered in beta. Take caution using generated design for now.od
version 2 does not have good documentation yet.These slides were made using the R package xaringan
with the ninja-themes
and is available at bit.ly/UT-WS-expdesign
.
Download
For workshop participants, contact Emi for the tutorials.
day4-session03-expdesign-tutorial.Rmd
here, open in RStudio, push the button "Run Document" on the top tab and work through the exercises.
These slides were made using the R package xaringan
with the ninja-themes
and is available at bit.ly/UT-WS-expdesign
.
Download
For workshop participants, contact Emi for the tutorials.
day4-session03-expdesign-tutorial.Rmd
here, open in RStudio, push the button "Run Document" on the top tab and work through the exercises.
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |