biweight_midvariance: Biweight Midvariance

View source: R/biweight_midvariance.R

biweight_midvarianceR Documentation

Biweight Midvariance

Description

This function calculates the biweight midvariance of a numeric vector, which is a robust measure of scale that can be used to estimate the variability of the data while being resistant to the influence of outliers.

Usage

biweight_midvariance(x, drop.na = FALSE)

Arguments

x

A numeric vector.

drop.na

A logical value indicating whether to remove missing values (NA) from the calculations. If TRUE (the default), missing values will be removed. If FALSE, missing values will be included in the calculations.

Details

For scale estimators, the standard deviation (or variance) is the optimal estimator for Gaussian data. However, it is not resistant and it does not have robustness of efficiency. In robust statistics, the median absolute deviation (MAD) is a resistant estimate, but it has only modest robustness of efficiency, while the biweight midvariance estimator is both resistant and robust of efficiency.

Value

The biweight midvariance of the input vector.

Author(s)

Christian L. Goueguel

References

  • Wilcox, R., (1997). Introduction to Robust Estimation and Hypothesis Testing. Academic Press

Examples

vec <- c(1, 2, 3, 4, 4, 2)
stats::var(vec)
biweight_midvariance(vec)

vec <- c(1, 2, 3, 4, 4, 100)
stats::var(vec)
biweight_midvariance(vec)


ChristianGoueguel/specProc documentation built on Nov. 9, 2024, 3:23 p.m.