outlier: Outlier Region

View source: R/outlier.R

outlierR Documentation

Outlier Region

Description

The function outlier computes outlier regions.

Usage

outlier(x, ...)

## S3 method for class 'rmx'
outlier(x, prob = 0.001, ...)

## S3 method for class 'outlier'
print(x, digits = 3, ...)

Arguments

x

object of S3 class rmx.

prob

probability used to define outliers.

digits

minimal number of significant digits.

...

further arguments passed through.

Details

The function is inspired by the outlier rejection rule: median +/- 3 MAD. Since pnorm(3) is about 0.001, we use it as default.

In case of optimally-robust RMX estimators computed with function rmx (S3 class rmx), the outliers are defined using the respective quantiles of the fitted model. That is, the respective prob and 1-prob quantiles define the boundaries of the outlier region. In case of normal location and scale, this is equivalent to replacing median and MAD by the respective RMX estimates.

Value

An object of class "outlier" is returned. It contails at least the following arguments:

rmx

object of class rmx.

lower

lower boundary of outlier region.

upper

upper boundary of outlier region.

prop.outlier

proportion of data in the outlier region.

p.outlier

probability of the outlier region under the fitted model.

prop.lower

proportion of data in the lower outlier region.

prop.upper

proportion of data in the upper outlier region.

p.lower

probability of the lower outlier region under the fitted model.

p.upper

probability of the upper outlier region under the fitted model.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

References

Kohl, M. (2005). Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.

M. Kohl, P. Ruckdeschel, and H. Rieder (2010). Infinitesimally Robust Estimation in General Smoothly Parametrized Models. Statistical Methods and Application, 19(3):333-354.

Rieder, H. (1994) Robust Asymptotic Statistics. New York: Springer.

Rieder, H., Kohl, M. and Ruckdeschel, P. (2008) The Costs of not Knowing the Radius. Statistical Methods and Applications 17(1) 13-40. Extended version: http://r-kurs.de/RRlong.pdf.

See Also

rmx, getOutliers, cniper

Examples

ind <- rbinom(100, size=1, prob=0.05) 
x <- rnorm(100, mean=ind*3, sd=(1-ind) + ind*9)
res <- rmx(x, eps.lower = 0.01, eps.upper = 0.1)
outlier(res)

stamats/rmx documentation built on Sept. 29, 2023, 7:13 p.m.