mahalanobis | R Documentation |
Compute the squared Mahalanobis distance (fast implementation).
mahalanobis(x, mu, sigma, ischol = FALSE)
x |
Numeric. A vector (of length p) or matrix (with p columns). |
mu |
Numeric. A vector of length p. |
sigma |
Numeric. A p \times p non-negative definite matrix. |
ischol |
Logical. Set to |
The squared Mahalanobis distance for all rows in x
and the
mean vector mu
with respect to covariance matrix sigma
,
defined as (x - μ)' Σ^{-1}(x - μ).
Emily Goren, emily.goren@gmail.com
Mahalanobis, Prasanta Chandra. "On the Generalised Distance in Statistics." Proceedings of the National Institute of Sciences of India 2 (1936): 49-55.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.