ANOVA R code for generalized randomized block design

kelseyk2

New Member
Does anyone know how to write R code for an ANOVA using a generalized randomized block design? I have two blocks (random) and three treatments (fixed) each with two reps at each block. I know the RCBD code is aov(object~Block*Trt), but I'm not sure how to specify the error term for the GRBD.

Dason

o <- lmer(y ~ trt + (1 | block), data = dat)