outlyingness | R Documentation |
Computes the Stahel-Donoho outlyingness. If type
is any of the available types by andrews()
then
the projection vectors are generated along the andrews curves. Otherwise step
random directions
will be used. Note that the projection vectors are always normalized to length one.
outlyingness(x, type = 1, step = 100, xlim = NULL, normalize = 1)
x |
data frame |
type |
type of curve, see |
step |
step smoothness of curves |
xlim |
the x limits (x1, x2) |
normalize |
type of normalization, see |
the Stahel-Donoho outlyingness
Stahel, W. (1981), Robuste Schätzungen: infinitesimale Optimalität und Schätzungen von Kovarianzmatrizen, PhD thesis, ETH Z¨urich.
Donoho, D. (1982), Breakdown properties of multivariate location estimators, Ph.D. Qualifying paper, Dept. Statistics, Harvard University, Boston.
# use projection vectors from the Andrews curve
sdo <- outlyingness(iris)
col <- gray(1-sdo/max(sdo))
andrews(iris, clr=col, ymax=NA)
# use 1000 random projection vectors
sdo <- outlyingness(iris, type=0, step=1000)
col <- gray(1-sdo/max(sdo))
andrews(iris, clr=col, ymax=NA)
# use 1000 random projection vectors with adjusted outlyingness
library("robustbase")
x <- numarray(iris)
x <- scale(x, center=apply(x, 2, min), scale=apply(x, 2, max)-apply(x, 2, min))
sdo <- adjOutlyingness(x, ndir=1000, only.outlyingness=TRUE)
col <- gray(1-sdo/max(sdo))
andrews(as.data.frame(x), clr=col, ymax=NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.