find_ueda_outliers: Automatic detection and removal of outliers using Ueda's...

Description Usage Arguments Value References Examples

View source: R/find_ueda_outliers.R

Description

A function to calculate all components of Ueda's method.

Usage

1
find_ueda_outliers(x, smax = 5)

Arguments

x

A numeric vector

smax

The maximum number of outliers to be detected. By default, smax = 3.

Value

A list of 4 components:

1. The Ut matrix.

2. The label matrix.

3. The input numeric vector.

4. The input vector with no outliers.

References

Marmolejo-Ramos, F., Vélez, J.I. & Romão, X. Automatic detection of discordant outliers via the Ueda’s method. J Stat Distrib App 2, 8 (2015). https://doi.org/10.1186/s40488-015-0031-y

Examples

1
2
3
4
5
6
7
8
# random seed for reproducibility
set.seed(13)
# introduce 5 outliers
x <- c(rnorm(25, 300, 10), rnorm(5, 400, 5))
# shuffle the data
x <- sample(x)
# removes up to 5 outliers
find_ueda_outliers(x, smax = 5)

jivelez/ueda documentation built on Dec. 21, 2021, 12:08 a.m.