Learn R Programming

rapport (version 0.51)

rp.outlier: Outlier test

Description

A simple test for outliers. This functions returns all extreme values (if any) found in the specified vector.

Usage

rp.outlier(x)

Arguments

x
a numeric vector of values

Value

  • vector of outlier values

References

{ Credit goes to PaulHurleyuk: http://stackoverflow.com/a/1444548/564164

  • Lund, R. E. 1975, "Tables for An Approximate Test for Outliers in Linear Models", Technometrics, vol. 17, no. 4, pp. 473-476.
  • Prescott, P. 1975, "An Approximate Test for Outliers in Linear Models", Technometrics, vol. 17, no. 1, pp. 129-132.
}

Examples

Run this code
rp.outlier(mtcars$hp)
rp.outlier(c(rep(1,100), 200))
rp.outlier(c(rep(1,100), 200,201))

Run the code above in your browser using DataLab