# NOT RUN {
library(agricolae)
data(sweetpotato)
model<-aov(yield~virus, data=sweetpotato)
comparison <- scheffe.test(model,"virus", group=TRUE,console=TRUE,
main="Yield of sweetpotato\nDealt with different virus")
# Old version scheffe.test()
df<-df.residual(model)
MSerror<-deviance(model)/df
Fc<-anova(model)["virus",4]
comparison <- with(sweetpotato,scheffe.test(yield, virus, df, MSerror,
Fc, group=TRUE,main="Yield of sweetpotato. Dealt with different virus"))
# }
Run the code above in your browser using DataLab