summarizeRobWeights.RdPrint a nice “summary” about a numeric vector of robustness weights. Observations with weights around zero are marked as outliers.
numeric vector of robustness weigths.
digits to be used for printing.
string to be printed as header line.
numeric tolerance \(\epsilon\): values of w
with \(\left|w_i\right| < \epsilon/n\) are said to
be outliers.
numeric tolerance: values of w with
\(\left|1 - w_i\right| < eps1\) are said to
have weight ‘~= 1’.
potential further arguments, passed to
print().
The summary methods for lmrob
and glmrob make use of summarizeRobWeights().
Our methods for weights(),
weights.lmrob(*, type="robustness") and
weights.glmrob(*, type="robustness").
none; the function is used for its side effect of printing.
w <- c(1,1,1,1,0,1,1,1,1,0,1,1,.9999,.99999, .5,.6,1e-12)
summarizeRobWeights(w) # two outside ~= {0,1}
#> Robustness weights:
#> 3 observations c(5,10,17) are outliers with |weight| <= 1e-12 ( < 0.005882);
#> 12 weights are ~= 1. The remaining 2 ones are
#> 15 16
#> 0.5 0.6
summarizeRobWeights(w, eps1 = 5e-5)# now three outside {0,1}
#> Robustness weights:
#> 3 observations c(5,10,17) are outliers with |weight| <= 1e-12 ( < 0.005882);
#> 11 weights are ~= 1. The remaining 3 ones are
#> 13 15 16
#> 0.9999 0.5000 0.6000
## See the summary(<lmrob>) outputs