Description Usage Arguments Details Value Author(s) See Also Examples
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
)
1 | Mahalanobis(x, center, cov, method = c("classical", "mcd", "mve"), nsamp = "best", ...)
|
x |
a numeric matrix or data frame with, say, p columns |
center |
mean vector of the data; if this and |
cov |
covariance matrix (p x p) of the data |
method |
estimation method used for center and covariance, one of:
|
nsamp |
passed to |
... |
other arguments passed to |
Any missing data in a row of x
causes NA
to be returned for that row.
A numeric vector of squared Mahalanobis distances corresponding to the rows of x
.
Michael Friendly
1 2 3 | summary(Mahalanobis(iris[, 1:4]))
summary(Mahalanobis(iris[, 1:4], method="mve"))
summary(Mahalanobis(iris[, 1:4], method="mcd"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.