if (FALSE) {
library(agridat)
data(cochran.lattice)
dat <- cochran.lattice
libs(desplot)
desplot(dat, y~row*col|rep,
text=trt, # aspect unknown, should be 2 or .5
main="cochran.lattice")
# Random rep,row,column model often used by Federer
libs(lme4)
dat <- transform(dat, rowf=factor(row), colf=factor(col))
m1 <- lmer(y ~ trt + (1|rep) + (1|rep:row) + (1|rep:col), data=dat)
summary(m1)
}
Run the code above in your browser using DataLab