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()
attach(sweetpotato)
df<-df.residual(model)
MSerror<-deviance(model)/df
out <- LSD.test(yield,virus,df,MSerror, p.adj="bonferroni", group=FALSE)
detach(sweetpotato)
#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