Hi,
I would like to calculate the distance between two points/cases in a multivariate dataset, using the Mahalanobis distance.
One variation of the Mahalanobis distance is:
Md(ij)= (Xi-Xj)'inv(C)(Xi-Xj)
Where inv () is the inverse function.
My questions are:
Is this a correct use/formula of the distance?
Do I take the square root of this? How can I be sure the distance is positive given negative correlations?
Many Thanks,
Yehuda
|