Detect outliers in a numeric vector using standard methods.

Certain assessment performance statistics are sensitive to extreme outliers. As such, it is often necessary to remove outliers before performing a sales ratio study.

Standard method is to remove outliers that are 3 * IQR. Warnings are thrown when sample size is extremely small or when the IQR is extremely narrow. See IAAO Standard on Ratio Studies Appendix B. Outlier Trimming Guidelines for more information.

is_outlier(x, method = "iqr", ...)

quantile_outlier(x, probs = c(0.05, 0.95), ...)

iqr_outlier(x, mult = 3, ...)

Arguments

x

A numeric vector. Must be longer than 2 and not contain Inf or NaN.

method

Default "iqr". String indicating outlier detection method. Options are iqr or quantile.

...

Named arguments passed on to methods.

probs

Upper and lower percentiles denoting outlier boundaries.

mult

Multiplier for IQR to determine outlier boundaries.

Value

A logical vector this same length as x indicating whether or not each value of x is an outlier.

Functions

  • quantile_outlier(): Quantile method for identifying outliers.

  • iqr_outlier(): IQR method for identifying outliers.