Mark van der Loo's outlier detection method in the extremevalues package

Description

Separates data into vectors of outliers and a cleaned subset of the data.

Usage

1

Arguments

data

Vector of data values.

Value

Returns a list containing a vector of outliers and a vector of the cleaned data (subset).

outliers

A vector of outliers from the data set

subset

A vector containing the remaining data, cleaned of outliers

Note

Requires extremevalues package.

Author(s)

Daniel Finnegan

References

http://cran.r-project.org/web/packages/extremevalues/extremevalues.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
vanderLoo.outliers(set50)
vanderLoo.outliers(set200)

## The function is currently defined as
function (data) 
{
    result = getOutliers(data, method = "I")
    indices = c(result$iLeft, result$iRight)
    out = data[indices]
    sub = data[!data %in% out]
    return(list(outliers = out, subset = sub))
  }