Learn R Programming

plgraphics (version 1.2)

robrange: Robust Range of Data

Description

Determines a robust range of the data on the basis of the trimmed mean and mean absolute deviation

Usage

robrange(data, trim = 0.2, fac = 5.0, na.rm=TRUE)

Value

The robust range.

Arguments

data

a vector of data. Missing values are dropped

trim

trimming proportion

fac

factor used for expanding the range, see Details

na.rm

logical: should NAs be removed? If FALSE, result will be NA if there are NAs in 'data'.

Author

Werner A. Stahel

Details

The function determines the trimmed mean m and then the "upper trimmed mean" s of absolute deviations from m, multiplied by fac. The robust minimum is then defined as m-fac*s or min(data), whichever is larger, and similarly for the maximum.

See Also

plcoord

Examples

Run this code
  x <- c(rnorm(20),rnorm(3,5,20))
  robrange(x)

Run the code above in your browser using DataLab