Mahalanobis: Classical and Robust Mahalanobis Distances
Description
This function is a convenience wrapper to mahalanobis offering
also the possibility to calculate robust Mahalanobis squared distances using
MCD and MVE estimators of center and covariance (from cov.rob)
A numeric vector of squared Mahalanobis distances corresponding to the rows of x.
Arguments
x
a numeric matrix or data frame with, say, \(p\) columns
center
mean vector of the data; if this and cov are both supplied,
the function simply calls mahalanobis to
calculate the result, ignoring the method argument.
cov
covariance matrix (\(p x p\)) of the data
method
estimation method used for center and covariance, one of:
"classical" (product-moment),
"mcd" (minimum covariance determinant), or
"mve" (minimum volume ellipsoid).
nsamp
passed to cov.rob, just to make this argument explicit