outl_det_u: Univariate outlier detection

View source: R/mt_extra.R

outl_det_uR Documentation

Univariate outlier detection

Description

Perform outlier detection using univariate method.

Usage

outl_det_u(x, method = c("percentile", "median"))

Arguments

x

a numeric vector.

method

method for univariate outlier detection. Only percentile and median are supported.

Details

  • median: the absolute difference between the observation and the sample median is larger than 2 times of the Median Absolute Deviation divided by 0.6745.

  • percentile: either smaller than the 1st quartile minus 1.5 times of IQR, or larger than the 3rd quartile plus 1.5 times of IQR.

Value

a logical vector.

References

Wilcox R R, Fundamentals of Modern Statistical Methods: Substantially Improving Power and Accuracy, Springer 2010 (2nd edition), pages 31-35.

See Also

Other outlier detectors: outl_det_m()

Examples

x <- c(2, 3, 4, 5, 6, 7, NA, 9, 50, 50)
outl_det_u(x, "percentile")

wanchanglin/mtExtra documentation built on Aug. 2, 2024, 5:47 p.m.