# getReq: getReq - computation of the radius interval where IC1 is... In ROptEst: Optimally Robust Estimation

 getReq R Documentation

## getReq – computation of the radius interval where IC1 is better than IC2.

### Description

(tries to) compute a radius interval where IC1 is better than IC2, respectively the number of (worst-case) outliers interval where IC1 is better than IC2.

### Usage

`getReq(Risk,neighbor,IC1,IC2,n=1,upper=15, radOrOutl=c("radius","Outlier"), ...)`

### Arguments

 `Risk` an object of class `"asGRisk"` – the risk at which IC1 is better than IC2. `neighbor` object of class `"Neighborhood"`; the neighborhood at which to compute the bias. `IC1` some IC of class `"IC"` `IC2` some IC of class `"IC"` `n` the sample size; by default set to 1; then the radius interval refers to starting radii in the shrinking neighborhood setting of Rieder. Otherwise the radius interval is scaled down accordingly. `upper` the upper bound of the radius interval in which to search `radOrOutl` a character string specifying whether an interval of radii or a number of outliers is returned; must be one of "radius" (default) and "Outlier". `...` further arguments to be passed on `E()`.

### Value

The radius interval (given by its endpoints) where `IC1` is better than `IC2` according to the risk. In case `IC2` is better than `IC1` as to both variance and bias, the return value is `NA`.

### Author(s)

Peter Ruckdeschel peter.ruckdeschel@fraunhofer.itwm.de

### References

Hampel et al. (1986) Robust Statistics. The Approach Based on Influence Functions. New York: Wiley.

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

### Examples

```N0 <- NormLocationFamily(mean=2, sd=3)
## L_2 family + infinitesimal neighborhood
N0.Rob1 <- InfRobModel(center = N0, neighbor = neighbor)
## OBRE solution (ARE 95%)
N0.ICA <- optIC(model = N0.Rob1, risk = asAnscombe(.95))
## MSE solution
N0.ICM <- optIC(model=N0.Rob1, risk=asMSE())

getReq(asMSE(),neighbor,N0.ICA,N0.ICM,n=1)
getReq(asMSE(),neighbor,N0.ICA,N0.ICM,n=30)

## Don't test to reduce check time on CRAN

## RMX solution

getReq(asL1(),neighbor,N0.ICA,N0.ICM,n=30)
getReq(asL4(),neighbor,N0.ICA,N0.ICM,n=30)
getReq(asMSE(),neighbor,N0.ICA,N0.ICR,n=30)
getReq(asL1(),neighbor,N0.ICA,N0.ICR,n=30)
getReq(asL4(),neighbor,N0.ICA,N0.ICR,n=30)
getReq(asMSE(),neighbor,N0.ICM,N0.ICR,n=30)

### when to use MAD and when Qn
##  for Qn, see C. Croux, P. Rousseeuw (1993). Alternatives to the Median
##      Absolute Deviation, JASA 88(424):1273-1283
L2M <- NormScaleFamily()