error_se_mean: Calculate Standard Error of the Mean

Description Usage Arguments References See Also Examples

View source: R/errors.R

Description

Calculate Standard Error of the Mean

Usage

1
error_se_mean(x, na.rm = FALSE)

Arguments

x

vector: Input numeric vector to be summarized

na.rm

logical: If TRUE, NA (missing) values will be ignored.

References

http://en.wikipedia.org/wiki/Standard_error

See Also

Other functions for estimating sampling error: error_me(), error_se_prop()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# generate some measurements & estimate std. error
x <- rlnorm(50, 3)
summary(x)
error_se_mean(x)

# introduce some missing values
nas <- rbinom(50, 1, 0.1)
x <- ifelse(nas, NA_integer_, x)
summary(x)
error_se_mean(x) # doesn't work
error_se_mean(x, na.rm = TRUE)

southwick-associates/sastats documentation built on March 27, 2020, 9:39 p.m.