se: Standard Error

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

Description

Computes the standard errors for a numeric vector.

Usage

1
se(x, na.rm = TRUE)

Arguments

x

A vector of class numeric or integer.

na.rm

A logical value indicating whether NA values should be stripped before the computations.

Details

The standard error of the mean (SEM) (assuming statistical independence of the values in the sample) is estimated by taking the standard deviation of the population sample divided by the square root of the sample size:

se_{\hat{x}} = \frac{{s}}{{√{n}}}

Value

An object of the same type as x.

Author(s)

Daniel Marcelino

References

Agresti, A., and Finlay, B. (1997). Statistical methods for the social sciences.

Kenney, J. F. and Keeping, E. S. (1951) Standard Error of the Mean. In Mathematics of Statistics, Pt. 2, 2nd ed. Princeton, NJ: Van Nostrand, pp. 110 and 132–133.

See Also

detail.

Examples

1
2
3
4
5
x <- rnorm(100)

se(x)

detail(x)

SciencePo documentation built on May 2, 2019, 5:53 p.m.