se: Standard error

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Calculates the standard error of the values in x

Usage

1
se(x, na.rm = FALSE)

Arguments

x

a numeric vector.

na.rm

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

Details

The standard error of a length one vector is NA and if x is not a vector an error will be printed.

The standard error is defined as:

SE = sqrt(var(x)/length(x))

Value

The standard error of x is returned.

Author(s)

Thomas Kvalnes

See Also

var, length, sqrt

Examples

1
2
3
4
5
6
#The standard error of samples with the same mean and standard deviation, but
  #of different sizes.
se(rnorm(n = 10, mean = 5, sd = 1))
se(rnorm(n = 100, mean = 5, sd = 1))
se(rnorm(n = 1000, mean = 5, sd = 1))
se(rnorm(n = 10000, mean = 5, sd = 1))


Search within the lmf package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.