OutlierPCDist(x, ...) "OutlierPCDist"(x, grouping, control, k, explvar, trace=FALSE, ...) "OutlierPCDist"(formula, data, ..., subset, na.action)
model.frame
) containing the variables in the
formula formula
.x
.CovControlMcd-class
, CovControlOgk-class
,
CovControlSest-class
, etc.,
containing estimation options. The class of this object defines
which estimator will be used. Alternatively a character string can be specified
which names the estimator - one of auto, sde, mcd, ogk, m, mve, sfast, surreal,
bisquare, rocke. If 'auto' is specified or the argument is missing, the
function will select the estimator (see below for details)explvar
is not provided,
automatic dimensionality selection using profile likelihood, as
proposed by Zhu and Ghodsi will be used.trace = FALSE
OutlierPCDist
which
is a subclass of the virtual class Outlier
.
grouping
) the proposed method iterates
through the classes present in the data, separates each class from the rest and
identifies the outliers relative to this class, thus treating both types of outliers,
the mislabeled and the abnormal samples in a homogenous way.
The first step of the algorithm is dimensionality reduction using (classical) PCA.
The number of components to select can be provided by the user but if missing,
the number of components will be calculated either using the provided minimal
explained variance or by the automatic dimensionality selection using
profile likelihood, as proposed by Zhu and Ghodsi.
M. Zhu, and A. Ghodsi (2006). Automatic dimensionality selection from the scree plot via the use of profile likelihood. Computational Statistics & Data Analysis, Vol. 51, 918-930.
P. Filzmoser & V. Todorov (2012), Robust tools for the imperfect world, To appear.
OutlierPCDist
, Outlier
data(hemophilia)
obj <- OutlierPCDist(gr~.,data=hemophilia)
obj
getDistance(obj) # returns an array of distances
getClassLabels(obj, 1) # returns an array of indices for a given class
getCutoff(obj) # returns an array of cutoff values (for each class, usually equal)
getFlag(obj) # returns an 0/1 array of flags
plot(obj, class=2) # standard plot function
Run the code above in your browser using DataLab