Outlier: Detect Outliers

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

Description

Perform exploratory test to detect outliers.

Usage

1
2
3
4
Outlier(x, index = NULL, ...)

## Default S3 method:
Outlier(x, index = NULL, ...)

Arguments

x

A numeric object, a vector.

index

A numeric value to be considered in the computations.

...

Parameters which are typically ignored.

Details

The quantity in min reveals the minimum deviation from the mean, the integer value in the closest indicates the position of that element. The quantity in max is the maximum deviation from the mean, and the farthest integer value indicates the position of that value.

Value

Returns the minimum and maximum values, respectively preceded by their positions in the vector, matrix or data.frame.

Author(s)

Daniel Marcelino, dmarcelino@live.com

References

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

See Also

Winsorize for reduce the impact of outliers.

Examples

1
2
3
4
5
Outlier(x <- rnorm(20))

#data frame:
age <- sample(1:100, 1000, rep=TRUE);
Outlier(age)

SciencesPo documentation built on May 29, 2017, 9:28 p.m.