# split plot MJ 24.2 split2 <- read.table("split2.dat",header=T) split2$fert <- factor(split2$fert) split2$moist <- factor(split2$moist) split2$tray <- factor(split2$tray) # split plot using block:fert as random effect # see Venables & Ripley (1994, sec. 6.7) or Chambers & Hastie (1992, sec. 5.2.1) spl2.bfit <- aov(yield~moist*fert+Error(tray),split2) # note: nesting such as "moist/tray" appears to give erroneous values print(summary(spl2.bfit)) # split plot using LME (Splus on ALPHA computers only) # see Lindstrom & Bates (1988) JASA 83:1014-1022 library(nlme) spl2.lme <- lme(yield~moist*fert,random=~tray, cluster=~tray, data=split2, est.method="RML", re.structure="identity") print(summary(spl2.lme)) print(fitted.values(spl2.lme))