Compute standard deviation via median estimator.
Source:R/sd_via_median_estimator.R
sd_via_median_estimator.RdCompute 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.
Examples
sd_via_median_estimator(rnorm(100))
#> [1] 0.5747993