Returns the squared Mahalanobis distance of all rows in the design (model)
matrix \(X\) and the sample mean vector \(\mu\) of the columns
of \(X\) with respect to the sample covariance matrix \(\Sigma\).
This is (for vector \(x'\) a row of \(X\)) defined as
$$d^{2} = (x - \mu)' \Sigma^{-1} (x - \mu)$$
where
$$\mu = colMeans(X)$$
and
$$\Sigma = cov(X).$$