OutlierStatistic {probout} | R Documentation |
Nonparametric Outlier Statistic
Description
Robust nonparametric outlier statistic for univariate or multivariate data.
Usage
OutlierStatistic( x, nproj=1000, prior=NULL, seed=NULL)
Arguments
x |
A numeric vector or matrix for which the outlier statistic is to be determined. |
nproj |
If |
prior |
If |
seed |
An optional integer argument to |
Value
A vector giving the maximum value of the outlier statistic for each observation over all projections.
References
W. A. Stahel, Breakdown of Covariance Estimators, doctoral thesis, Fachgruppe Fur Statistik, Eidgenossische Technische Hochshule (ETH), 1981.
D. L. Donoho, Breakdown Properties of Multivariate Location Estimators, doctoral thesis, Department of Statistics, Harvard University, 1982.
Note
Note that partition probabilities are computed from an exponential distribution fit to the outlier statistic, rather than from the empirical distribution of the outlier statistic.
See Also
Examples
stat <- OutlierStatistic(faithful)
q.99 <- quantile(stat,.99)
out <- stat > q.99
plot( faithful[,1], faithful[,2],
main="red : .99 quantile for outlier statistic", cex=.5)
points( faithful[out,1], faithful[out,2],
pch = 4, col = "red", lwd = 1, cex = .5)
require(mvtnorm)
set.seed(0)
Sigma <- crossprod(matrix(rnorm(2*2),2,2))
x <- rmvt( 10000, sigma = Sigma, df = 2)
stat <- OutlierStatistic(x)
q.95 <- quantile(stat,.95)
hist(x, main = "gray : .95 quantile for outlier statistic", col = "black")
abline( v = x[stat > q.95], col = "gray")
hist(x, col = "black", add = TRUE)