Mahalanobis distance - R code [Dissolution / BCS / IVIVC]
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
.
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.
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

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
Regards,
Detlew
Complete thread:
- Dissolution similarity Nirali 2010-11-10 11:13
- Dissolution similarity Nirali 2011-04-21 12:27
- Dissolution similarity Aceto81 2011-04-28 15:14
- Mahalanobis distance - R coded_labes 2011-04-29 15:14
- Dissolution similarity Aceto81 2011-04-28 15:14
- DDSolver, Mahalanobis distance and its 90% CI yicaoting 2011-10-06 16:03
- DDSolver, Mahalanobis distance and its 90% CI Nirali 2012-07-03 07:40
- DDSolver, Mahalanobis distance and its 90% CI d_labes 2012-07-06 10:54
- DDSolver, Mahalanobis distance and its 90% CI Sid 2019-03-07 19:23
- Dissolution similarity Nirali 2011-04-21 12:27