semicon <- read.table("http://www.stat.ufl.edu/~winner/data/semicon_qual.dat", header=F,col.names=c("Lot","Wafer","Wafer1","RepNum","Y")) attach(semicon); names(semicon) Lot <- factor(Lot) Wafer1 <- factor(Wafer1) semicon.mod1 <- aov(Y ~ Lot + Lot/Wafer1) anova(semicon.mod1) semicon.mod2 <- aov(Y ~ Lot + Error(Wafer1)) summary(semicon.mod2) library(nlme) semicon3 <- lme(Y ~ 1, random = ~ 1|Lot/Wafer1) summary(semicon3) intervals(semicon3) ### Uses different method than we used in notes library(lmerTest) semicon.mod4 <- lmer(Y ~ 1 + (1|Lot) + (1|Lot:Wafer1)) summary(semicon.mod4) confint(semicon.mod4) ### Uses different method than we used in notes