outliers: Detection of Outliers

Description Usage Arguments Value Author(s) References See Also Examples

Description

Perform an exploaratory test to detect outliers. This function returns the minimum and maximum values, respectively preceded by their positions in the vector, matrix or data.frame. The quantity for min reveals the minimum deviation from the mean, the integer in closest highlights the position of the element. In the same vein, the quantity for max is the maximum deviation from the mean, and the farthest integer is the position of such higher quantity.

Usage

1
outliers(x, index = NULL)

Arguments

x

A numeric object.

index

A numeric value to be considered in the computations.

Value

The returning object will depend on the inputing object, either a vector or a data frame.

Author(s)

Daniel Marcelino

References

Dixon, W.J. (1950) Analysis of extreme values. Ann. Math. Stat. 21(4), 488–506.

See Also

For diminish the impact of outliers see winsor.mean.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#data frame;
data(ltaylor96)

outliers(ltaylor96)


## vetor
outliers(ltaylor96$spot)

outliers(x <- rnorm(20))

SciencePo documentation built on May 2, 2019, 5:53 p.m.