mahalanobis | R Documentation |
Computes the squared Mahalanobis distance of all rows in x
.
## S4 method for signature 'CompositionMatrix'
mahalanobis(x, center, cov, ..., robust = TRUE, method = c("mve", "mcd"))
## S4 method for signature 'ILR'
mahalanobis(x, center, cov, ..., robust = TRUE, method = c("mve", "mcd"))
x |
A |
center |
A |
cov |
A |
... |
Extra parameters to be passed to |
robust |
A |
method |
A |
A numeric
vector.
N. Frerebeau
stats::mahalanobis()
Other statistics:
aggregate()
,
condense()
,
covariance()
,
dist
,
margin()
,
mean()
,
pip()
,
quantile()
,
scale()
,
variance()
,
variance_total()
,
variation()
## Data from Aitchison 1986
data("hongite")
## Coerce to compositional data
coda <- as_composition(hongite)
## Mahalanobis distance
mahalanobis(coda)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.