Skip to contents

Takes a vector and computes its standard error of the mean.

Usage

sem(x, na.rm = TRUE);

Arguments

x

A vector

na.rm

Should NAs be removed. Defaults to TRUE.

Value

A numeric value giving the standard error of the mean of the input vector

Author

Stephenie Prokopec

Examples

x <- c(1,2,2,NA,3);
sem(x);
#> [1] 0.4082483
sem(x, na.rm = FALSE);
#> [1] NA