Learn R Programming

rQCC (version 2.22.12)

sd.unbiased: Unbiased standard deviation

Description

This function computes the unbiased standard deviation of the values in x. If na.rm is TRUE, then missing values are removed before computation proceeds.

Usage

sd.unbiased(x, na.rm = FALSE)

Arguments

x

a numeric vector or an R object which is coercible to one by as.double(x).

na.rm

logical. If TRUE, then missing values are removed before computation proceeds.

Author

Chanseok Park

Details

sd is not unbiased. This function computes sd divided by \(c_4(n)\), where \(c_4(n)\) is obtained by c4.factor(n, estimator="sd"){rQCC}.

See Also

sd for the square root of var, but it is biased.
Refer to mad.unbiased{rQCC} for finite-sample unbiased median absolute deviation (MAD) estimator, the most robust alternative.

Examples

Run this code
sd.unbiased(1:2)

Run the code above in your browser using DataLab