View source: R/directOutlyingness.R
directOutlyingness | R Documentation |
This function computes the directional outlyingness of a numeric vector, as proposed by Rousseeuw et al. (2018), which is a measure of outlyingness of data point that takes the skewness of the underlying distribution into account.
directOutlyingness(
x,
cutoff.quantile = 0.995,
rmZeroes = FALSE,
maxRatio = NULL,
precScale = 1e-10
)
x |
A numeric vector |
cutoff.quantile |
A numeric value between 0 and 1 specifying the quantile for outlier detection (default: 0.995). |
rmZeroes |
A logical value. If |
maxRatio |
A numeric value greater than 2. If provided, constrains the ratio between positive and negative scales (default: |
precScale |
A numeric value specifying the precision scale for near-zero comparisons (default: 1e-10). |
Directional outlyingness takes the potential skewness of the underlying
distribution into account, by the splitting the univariate dataset in two half
samples around the median. And then apply one-step M-estimator with Huber
\rho
-function for scaling each part.
A tibble with columns:
data
: The original numeric values.
score
: The calculated outlyingness score.
flag
: A logical vector indicating whether each value is a potential outlier or not.
Christian L. Goueguel
Rousseeuw, P.J., Raymaekers, J., Hubert, M., (2018). A Measure of Directional Outlyingness With Applications to Image Data and Video. Journal of Computational and Graphical Statistics, 27(2):345–359.
x <- c(1, 5, 3, 9, 2, 6, 4, 8, 7, 1e3)
directOutlyingness(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.