stderror: Standard error

View source: R/stderror.R

stderrorR Documentation

Standard error

Description

Calculates the standard error of the mean of x with or without applying the Bessel correction (dividing by N-1 rather than N). Default behavior is to apply the correction.

Usage

stderror(x, bessel = TRUE, na.rm = FALSE)

Arguments

x

value(s) for which the standard error of the mean should be computed

bessel

a logical value indicating whether Bessel's correction should be applied to obtain an unbiased estimate of the variance of the sampling distribution.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Details

Note that Bessel's correction provides an unbiased estimate of the variance of the sampling distribution, but the estimate of the standard deviation is still biased.

Value

standard error of the mean of x

References

Bessel's correction. (2015, Aug 15). Retrieved from http://en.wikipedia.org/wiki/Bessel's_correction

Hays, W.L. (1994). Statistics (5th ed.). Belmont, CA: Wadsworth.

Examples

stderror(c(150, 115, 130, 170, 190))

sfraundorf/psycholing documentation built on April 23, 2022, 2:50 a.m.