robrange: Robust Range of Data

robrangeR Documentation

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)

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'.

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.

Value

The robust range.

Author(s)

Werner A. Stahel

See Also

plcoord

Examples

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

plgraphics documentation built on Oct. 19, 2023, 3 p.m.