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,variation=c("SE","SD","range","IQR"),horiz=FALSE, bar=TRUE,...)

Arguments

x

object means of the comparisons the LSD.test, HSD.test,...,etc

variation

SE=standard error, range=Max-Min or IQR=interquartil range

horiz

Horizontal or vertical bars

bar

paint bar

...

Parameters of the function barplot()

Details

x: data frame formed by 5 columns: name of the bars, height, level out: LSD.test, HSD, waller.test, scheffe.test, duncan.test, SNK.test, friedman, kruskal, waerden.test and Median.test.

Value

A list with numeric vectors giving the coordinates of all the bar midpoints drawn.

x

eje-1 coordinate

height

eje-2 coordinate by group

Author(s)

Felipe de Mendiburu

See Also

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

Examples

library(agricolae)
data(sweetpotato)
model<-aov(yield~virus,data=sweetpotato)
out <- waller.test(model,"virus", console=TRUE,
main="Yield of sweetpotato\ndealt with different virus")
oldpar<-par(mfrow=c(2,2),cex=1)
bar.err(out$means,variation="range",horiz=TRUE,xlim=c(0,45),angle=125,density=6,
 main="range")
bar.err(out$means,variation="SD",ylim=c(0,45),col=colors()[30],
 main="Standard deviation",density=8)
bar.err(out$means,variation="SE",horiz=TRUE,xlim=c(0,45),density=8,
 col="brown",main="Standard error")
bar.err(out$means,variation="range",ylim=c(0,45),bar=FALSE,col="green",
 main="range")
par(oldpar)
oldpar<-par(mfrow=c(1,2),cex=1)
bar.err(out$means,variation="range",ylim=c(0,45),bar=FALSE,col=0)
abline(h=0)
# horiz = TRUE
bar.err(out$means,variation="SE",horiz=TRUE,xlim=c(0,45),bar=FALSE,col=0)
#startgraph
par(oldpar)
#endgraph

[Package agricolae version 1.3-7 Index]