Calculate standard error of the mean.
Calculate standard error of the mean.
se(x, na.rm = FALSE)
x |
A vector. |
na.rm |
Logical: whether or not to remove NA values (default set to FALSE - including NAs). |
Standard Error of the mean.
Other Utility functions:
findAbsMin()
,
find_n_neighbors()
,
firstLetterCap()
,
getArrowPos()
,
getDec()
,
getRange()
,
getRatioCoords()
,
get_palette()
,
group_sort()
,
inch2coords()
,
isColor()
,
list2str()
,
move_n_point()
,
orderBoxplot()
,
sortGroups()
# load example data: data(chickwts) str(chickwts) # first calculate means per feeding type: avg <- with(chickwts, tapply(weight, list(feed), mean)) par(cex=1.25) b <- barplot(avg, beside=TRUE, names.arg=FALSE, ylim=c(0,450)) text(b, rep(0, length(b)), labels=names(avg), srt=90, adj=-.25) # calculate mean collapsing over feeding types: abline(h=mean(avg), lwd=1.5, col='red1') # add SE reflecting variation between feeding types: abline(h=mean(avg)+c(-1,1)*se(avg), lty=2, col='red1') text(getCoords(.5), mean(avg)+se(avg), labels=expression('mean' %+-% '1SE'), pos=3, col='red1') # Note that SE makes more sense for experiments with # different groups or participants.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.