Skip to contents

Compute standard deviation via median estimator. Please refer to formula #2 in Engbert & Kliegl (2003). Falls back on mean estimator, if computed standard deviation is smaller than .Machine$double.eps. Raises an error if the results using the mean estimator is still smaller than .Machine$double.eps.

Usage

sd_via_median_estimator(x, na.rm = FALSE)

Arguments

x

Numeric values

na.rm

Whether to exclude NA values, defaults to FALSE.

Value

float

Examples

sd_via_median_estimator(rnorm(100))
#> [1] 0.5747993