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

posted by d_labes  – Berlin, Germany, 2011-04-29 17:14 (4717 d 02:43 ago) – Posting: # 6973
Views: 20,827

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,957 posts in 4,819 threads, 1,636 registered users;
81 visitors (0 registered, 81 guests [including 10 identified bots]).
Forum time: 18:58 CET (Europe/Vienna)

Nothing shows a lack of mathematical education more
than an overly precise calculation.    Carl Friedrich Gauß

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