se_mean: Standard error of the mean

View source: R/specific_calculations.R

se_meanR Documentation

Standard error of the mean

Description

The standard error of the mean is how the estimated mean changes with multiple measurements (i.e. how far away the mean of each sampling event or observation is from the true population mean). SE drops as sample size grows because as you take more mreasurements, the sampling means cluster more closely to the true mean.

Usage

se_mean(vec, na.rm = FALSE)

Arguments

vec

(Numeric) A vector.

na.rm

(Logical) If 'TRUE', remove 'NA's from 'vec'.

Value

The standard error of the mean of 'vec'.

Examples

se_mean(c(1, 2, 3, 4, NA_integer_))
#> NA

se_mean(c(1, 2, 3, 4, NA_integer_), na.rm = TRUE)
#> [1] 0.6454972

DesiQuintans/desiderata documentation built on April 9, 2023, 5:43 a.m.