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

posted by d_labes  – Berlin, Germany, 2011-04-29 17:14 (5181 d 13:21 ago) – Posting: # 6973
Views: 22,778

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
23,427 posts in 4,929 threads, 1,676 registered users;
26 visitors (0 registered, 26 guests [including 11 identified bots]).
Forum time: 06:36 CEST (Europe/Vienna)

Many people tend to look at programming styles and languages like religions:
if you belong to one, you cannot belong to others.
But this analogy is another fallacy.    Niklaus Wirth

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