bar.err {agricolae}R Documentation

Plotting the standard error or standard deviance of a multiple comparison of means

Description

It plots bars of the averages of treatments and standard error or standard deviance. It uses the objects generated by a procedure of comparison like LSD, HSD, Kruskal and Waller-Duncan.

Usage

bar.err(x, std = TRUE, horiz = FALSE, ...)

Arguments

x object or comparisons the LSD.test, HSD.test,...,etc
std Standard deviation or standar error
horiz Horizontal or vertical bars
... Parameters of the function barplot()

Details

x: data frame formed by 5 columns: name of the bars, height, level replications and standard error of the bar. std = T : standard deviation. std = F : standard error.

Value

x object
std TRUE or FALSE
horiz TRUE or FALSE
... Parameters of the function barplot()

Author(s)

Felipe de Mendiburu

See Also

LSD.test, HSD.test, waller.test, kruskal, bar.group

Examples

library(agricolae)
data(sweetpotato)
attach(sweetpotato)
model<-aov(yield~virus)
df<-df.residual(model)
MSerror<-deviance(model)/df
Fc<-anova(model)[1,4]
comparison <- waller.test(yield,virus,df, MSerror, Fc,
main="Yield of sweetpotato\ndealt with different virus")
# std = F (default) is standard error 
#startgraph
par(mfrow=c(2,2))
par(cex=1)
bar.err(comparison,horiz=TRUE,xlim=c(0,45),angle=125,density=6,
 main="Standard deviation")
bar.err(comparison,std=FALSE,horiz=TRUE,xlim=c(0,45),density=8,
 col="brown",main="Standard error")
bar.err(comparison,ylim=c(0,45),density=4,angle=125,col="green",
 main="Standard deviation")
bar.err(comparison,std=FALSE,ylim=c(0,45),density=10,col="blue",
 main="Standard error")
#endgraph

[Package agricolae version 1.0-3 Index]