Mahalanobis distance - R code [Dissolution / BCS / IVIVC]

posted by d_labes  – Berlin, Germany, 2011-04-29 17:14 (4744 d 20:35 ago) – Posting: # 6973
Views: 20,972

Dear Ace,

there is a function mahalanobis() in the stats package, i.e in the base installation of R.
But unfortunately it gives no confidence interval out of the box.
And this is the tricky part I think and for that I wish you a nice weekend :-D.

Beside the Tsong paper which is cryptic in this respect and doesn't give ready to program advice have a look at this online resource for another method:
B. Reiser
"CONFIDENCE INTERVALS FOR THE MAHALANOBIS DISTANCE"
Needs some postscript reader.

Have also a look at the function ginv() of the MASS package, which implements the Moore-Penrose inverse which is necessary in calculating the Mahalanobis distance if the estimated variance-covariance matrix is not invertible.

If you are interested, I have some code ruins.

Regards,

Detlew

Complete thread:

UA Flag
Activity
 Admin contact
22,993 posts in 4,828 threads, 1,655 registered users;
132 visitors (0 registered, 132 guests [including 5 identified bots]).
Forum time: 13:50 CEST (Europe/Vienna)

Never never never never use Excel.
Not even for calculation of arithmetic means.    Martin Wolfsegger

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5