# NOT RUN {
library(agricolae)
data(sweetpotato)
model<-aov(yield~virus, data=sweetpotato)
out <- LSD.test(model,"virus", p.adj="bonferroni")
#stargraph
bar.group(out$groups,ylim=c(0,45),density=4,border="blue")
#endgraph
# Old version LSD.test()
df<-df.residual(model)
MSerror<-deviance(model)/df
out <- with(sweetpotato,LSD.test(yield,virus,df,MSerror, p.adj="bonferroni",
group=FALSE))
#stargraph
# Variation range: Max - Min
bar.err(out$means,variation="range",ylim=c(0,44),bar=FALSE,col=0)
#endgraph
LSD.test(model,"virus",p.adj="bon",console=TRUE)
# }
Run the code above in your browser using DataLab