# R programs for Ex. 1, by Yu-Ling Tseng # Which program should we use to analyze the data in EX. 1? # Is one of the three models considered here correct $\ldots$ ? table1 <- read.table("table1_data.txt", header=T); table1 table1$Machine <- factor(table1$Machine) table1$Replication <- factor(table1$Replication) table1$Order <- factor(table1$Order) attach(table1) plot(Order, Time, xlab="Order"); windows(); plot(Replication, Time, xlab="Replication"); windows(); plot(Machine, Time, xlab="Machine"); fm <- aov(Time~Replication+Machine+Order, data=table1); fm summary(fm) fm0 <- update(fm, .~.-Order) summary(fm0); fm1 <- update(fm0, .~.-Replication) summary(fm1); anova(fm,fm0,fm1); coef(fm); coef(fm0); coef(fm1);