From: Henrik Bengtsson <hb_at_maths.lth.se>

Date: Wed 14 Dec 2005 - 17:05:32 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Dec 14 17:11:42 2005

Date: Wed 14 Dec 2005 - 17:05:32 EST

Hi,

help on 'mahalanobis' (in the stats package in Rv2.2.0) now says:

"Description:

Returns the Mahalanobis distance of all rows in 'x' and the vector mu='center' with respect to Sigma='cov'. This is (for vector 'x') defined as D^2 = (x - mu)' Sigma^{-1} (x - mu)"

It does return D^2 as written. However, would the text be more clear if it says "Returns the _squared_ Mahalanobis distance D^2..." instead? If so, then text in the example code, e.g. "##- Here, D^2 = usual Euclidean distances" and the title of the first plot will also have to be updated.

Compare this with what dist() in the same package returns. When asking for the Equlidean distance (matrix) between rows in a matrix, we get D not D^2, e.g. dist(c(1,3)) == 2.

Cheers

Henrik

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Dec 14 17:11:42 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:41:36 EST
*