Description Usage Arguments Details Value Examples
Identify outliers using the standard IQR approach or assuming a normal distribution and identifying outliers using probability. See details below for description of the calculations.
1 2 | id_outliers(x = NULL, method = c("quantile", "prob", "logprob"), p = 0.05,
tail = c("both", "left", "right"))
|
x |
A vector that is of class numeric, or coercible to one |
method |
The method to use in order to identify outliers. This should be one of "quantile" or "prob" |
p |
If method "prob" is selected, this parameter defines the probability threshold for outlier classification |
tail |
[DOC NEEDED] |
IQR approach: outliers are defined as observations that fall above 1.5 times the third quantile and below 1.5 times the first quantile.
Probability approach: assuming a normal distribution of values, outliers are flagged as values that have a 5 sample data. This method uses both tails of the distribution (e.g. values that are below and above the mean)
A logical vector where TRUE identifies the position of an outlier in the input argument
1 2 3 4 | #vec <- rnorm(100, 0, 1)
#bout <- id_outliers(vec)
#dt <- data.table(Values = vec, bOutlier = bout)
#dt[bOutlier == TRUE]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.