Computes the squared Mahalanobis distance of all rows in x.

## Usage

# S4 method for CompositionMatrix
mahalanobis(x, center, cov, robust = TRUE, ...)

## Arguments

x

A CompositionMatrix object.

center

A numeric vector giving the mean vector of the distribution. If missing, will be estimated from x.

cov

A numeric matrix giving the covariance of the distribution. If missing, will be estimated from x.

robust

A logical scalar: should robust location and scatter estimation be used (see robustbase::covMcd())?

...

Extra parameters to be passed to robustbase::covMcd(). Only used if robust is TRUE.

## Value

A numeric vector.

stats::mahalanobis()
Other statistics: aggregate(), covariance, dist(), mean(), variation()