cov.nnve {covRobust} | R Documentation |
The cov.nnve
function for robust covariance estimation
by the nearest neighbor variance estimation (NNVE) method of
Wang and Raftery (2002, JASA).
cov.nnve(datamat, k = 12, pnoise = 0.05, emconv = 0.001, bound = 1.5, extension = TRUE, devsm = 0.01)
datamat |
matrix in which each row represents an observation or point and each column represents a variable |
k |
desired number of nearest neighbors (default is 12) |
pnoise |
percent of added noise |
emconv |
convergence tolerance for EM |
bound |
value used to identify surges in variance caused by
outliers wrongly included as signal points (bound = 1.5
means a 50 percent increase) |
extension |
whether or not to continue after reaching the last
chi-square distance. The default is to continue,
which is indicated by setting extension = TRUE . |
devsm |
when extension = TRUE , the algorithm stops if the
relative difference in variance is less than devsm .
(default is 0.01) |
A list with the following components:
cov |
covariance matrix |
mu |
mean vector |
postprob |
posterior probability |
classification |
classification (0=noise otherwise 1) obtained
by rounding postprob |
innc |
list of initial nearest neighbor cleaning results (components are the covariance, mean, posterior probability and classification) |
terms of use: GPL version 2 or newer.
Wang and Raftery (2002),Nearest neighbor variance estimation (NNVE): Robust covariance estimation via nearest neighbor cleaning (with discussion), Journal of the American Statistical Association 97:994-1019
see also University of Washington Statistics Technical Report 368 (2000) http://www.stat.washington.edu/www/research/reports
data(iris) cov.nnve(iris[-5])