Last chance! 50% off unlimited learning
Sale ends in
Detect outliers with respect to a normal distribution model.
IsMahalanobisOutlier(X,...,alpha=0.05,goodOnly=NULL,
replicates=1000,corrected=TRUE,robust=TRUE,crit=NULL)
A logical vector giving for each element the result of the alpha-level test for beeing an outlier. TRUE corresponds to a significant result.
a dataset (e.g. given as acomp, rcomp, aplus, rplus or rmult) object
to which idt
and MahalanobisDist
apply.
further arguments to MahalanobisDist/gsi.mahOutlier
The confidence level for identifying outliers.
an integer vector. Only the specified index of the dataset should be used for estimation of the outlier criteria. This parameter if only a small portion of the dataset is reliable.
The number of replicates to be used in the Monte
Carlo simulations for determination of the quantiles. The
replicates
not given a minimum is computed from the alpha
level to ensure reasonable precission.
logical. Literatur often proposed to compare the Mahalanobis distances with Chisq-Approximations of there distributions. However this does not correct for multiple testing. If corrected is true a correction for multiple testing is used. In any case we do not use the chisq-approximation, but a simulation based procedure to compute confidence bounds.
A robustness description as define in
robustnessInCompositions
The critical value to be used. Typically the routine is called mainly for the purpose of finding this value, which it does, when crit is NULL, however sometimes we might want to specifiy a value used by someone else to reproduce the results.
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
See outliersInCompositions and robustnessInCompositions for a comprehensive introduction into the outlier treatment in compositions.
See OutlierClassifier1
for a highlevel method to
classify observations in the context of outliers.
OutlierClassifier1
, outlierplot
,
ClusterFinder1
if (FALSE) {
data(SimulatedAmounts)
datas <- list(data1=sa.outliers1,data2=sa.outliers2,data3=sa.outliers3,
data4=sa.outliers4,data5=sa.outliers5,data6=sa.outliers6)
opar<-par(mfrow=c(2,3),pch=19,mar=c(3,2,2,1))
tmp<-mapply(function(x,y){
plot(x,col=ifelse(IsMahalanobisOutlier(x),"red","gray"))
title(y)
},datas,names(datas))
}
Run the code above in your browser using DataLab