if (FALSE) {
library(agridat)
data(riddle.wheat)
dat <- riddle.wheat
datb39 <- subset(dat, expt=="Baart" & year==1939)
datb40 <- subset(dat, expt=="Baart" & year==1940)
datw39 <- subset(dat, expt=="WhiteFed" & year==1939)
datw40 <- subset(dat, expt=="WhiteFed" & year==1940)
# Match table 4, sections a, b, d, e
anova(aov(yield ~ factor(rep) + factor(col) + strain, datb39))
anova(aov(yield ~ factor(rep) + factor(col) + strain, datb40))
anova(aov(yield ~ factor(rep) + factor(col) + strain, datw39))
anova(aov(yield ~ factor(rep) + factor(col) + strain, datw40))
libs(desplot)
# Show the huge variaion between reps
dat$yrexpt <- paste0(dat$year, dat$expt)
desplot(dat, yield ~ row*rep|yrexpt, tick=TRUE, out1=col, main="riddle.wheat",
aspect=(5*16)/(30*.5))
# Show the randomization was the same in each year (but not each expt).
desplot(dat, strain ~ row*rep|yrexpt, tick=TRUE, out1=col, main="riddle.wheat")
}
Run the code above in your browser using DataLab