Learn R Programming

SciencesPo (version 1.02.12)

se: Calculate the Standard Error

Description

Compute the standard errors of a numeric vector

Usage

se(x, na.rm = TRUE)

Arguments

x
A vector of class numeric or integer
na.rm
a logical value for na.rm, default is na.rm=TRUE.

encoding

UTF-8

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 = \frac{{s}}{{\sqrt{n}}}$$

References

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.

Examples

Run this code
x <- rnorm(100);
se(x)

Run the code above in your browser using DataLab