Generic for computing the squared Mahalanobis distance.
mahalanobis(x, center, cov, inverted = FALSE, ...)
# S4 method for ANY,ANY,SWoodburyMatrix
mahalanobis(x, center, cov, inverted = FALSE, ...)
Numeric vector or matrix
Numeric vector representing the mean; if omitted, defaults to zero mean
Covariance matrix
Whether to treat cov
as a precision matrix; must be
FALSE
for SWoodburyMatrix
objects.
Passed to the Cholesky
function.
x = ANY,center = ANY,cov = SWoodburyMatrix
: Use the Woodbury matrix identity to compute the
squared Mahalanobis distance with the implicit matrix as the covariance.