robrange: Robust Range of Data

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

View source: R/regr.R

Description

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

Usage

1
robrange(data, trim = 0.2, fac = 3, 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 Stahel, ETH Zurich

See Also

plcoord

Examples

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

regr0 documentation built on May 31, 2017, 2:26 a.m.