powered by
Vector of Mahalanobis distances or their root. For use in awcoord only.
awcoord
mahalanodisc(x2, mg, covg, modus="square")
vector of (rooted) Mahalanobis distances.
numerical data matrix.
mean vector.
covariance matrix.
"md" (roots of Mahalanobis distances) or "square" (original squared form of Mahalanobis distances).
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en/
The covariance matrix is inverted by use of solvecov, which can be expected to give reasonable results for singular within-class covariance matrices.
solvecov
awcoord, solvecov
options(digits=3) x <- cbind(rnorm(50),rnorm(50)) mahalanodisc(x,c(0,0),cov(x)) mahalanodisc(x,c(0,0),matrix(0,ncol=2,nrow=2))
Run the code above in your browser using DataLab