error.bars {psych}R Documentation

Plot means and confidence intervals

Description

One of the many functions in R to plot means and confidence intervals. Meant mainly for demonstration purposes for showing the probabilty of replication from multiple samples. Can also be combined with such functions as boxplot to summarize distributions.

Usage

error.bars(x, ylab = "Dependent Variable",xlab="", ylim = NULL, ci = 1.96, labels = NULL, pos = NULL, arrow.len = 0.05, add = FALSE, ...)

Arguments

x A data frame or matrix
ylab y label
xlab x label
ylim if specified, the limits for the plot, otherwise based upon the data
ci What size confidence interval to use
labels X axis label
pos ~~Describe pos here~~
arrow.len How long should the top of the error bars be?
add add=FALSE, new plot, add=TRUE, just points and error bars
... ~~Describe ... here~~

Details

Value

Author(s)

William Revelle

See Also

See Also as error.crosses, ~~~

Examples

x <- matrix(rnorm(500),ncol=20)
error.bars(x)
#now do a boxplot and then add error bars
x.df <- as.data.frame(x)
boxplot(x.df)
error.bars(x.df, add=TRUE)


[Package psych version 1.0-33 Index]