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, ...)
A numeric vector. Must be longer than 2 and not contain
Inf
or NaN
.
Default "iqr". String indicating outlier detection method.
Options are iqr
or quantile
.
Named arguments passed on to methods.
Upper and lower percentiles denoting outlier boundaries.
Multiplier for IQR to determine outlier boundaries.
A logical vector this same length as x
indicating whether or
not each value of x
is an outlier.
quantile_outlier()
: Quantile method for identifying outliers.
iqr_outlier()
: IQR method for identifying outliers.