The outlier detection method is based on quantiles but permits retaining short tails.
A sample is considered an outlier if it is outside an interval computed as
(lo - range * slack, hi + range * slack)
with lo
and hi
denoting
the limit
and 1 - limit
quantiles and range = hi - lo
.
Arguments
- .input
Sample vector.
- .limit
Quantile that separates inliers from outliers.
- .slack
Tolerated distance from limit quantile.
Examples
# An outlier gets flagged.
identify_vector_outliers_global (c (1:10, 100))
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE
# No outlier gets flagged with short tails.
identify_vector_outliers_global (1:10)
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE