oehlert3 <- read.table("http://www.stat.ufl.edu/~winner/sta6207/oehlertdata/EMP3-2.DAT", header=F, col.names=c("trt_oeh3","y_oeh3")) attach(oehlert3); names(oehlert3) tapply(y_oeh3,trt_oeh3,mean) tapply(y_oeh3,trt_oeh3,sd) tapply(y_oeh3,trt_oeh3,length) trt_oeh3.f <- factor(trt_oeh3) oeh3.mod1 <- aov(y_oeh3 ~ trt_oeh3.f) summary.lm(oeh3.mod1) options(contrasts=c("contr.sum","contr.poly")) oeh3.mod2 <- aov(y_oeh3 ~ trt_oeh3.f) summary.lm(oeh3.mod2) mean(y_oeh3) mean(y_oeh3[trt_oeh3==1]) mean(y_oeh3[trt_oeh3==2]) mean(y_oeh3[trt_oeh3==3]) mean(y_oeh3[trt_oeh3==4]) mean(y_oeh3[trt_oeh3==5]) mean(y_oeh3[trt_oeh3==1])-mean(y_oeh3) mean(y_oeh3[trt_oeh3==2])-mean(y_oeh3) mean(y_oeh3[trt_oeh3==3])-mean(y_oeh3) mean(y_oeh3[trt_oeh3==4])-mean(y_oeh3) mean(y_oeh3[trt_oeh3==5])-mean(y_oeh3)