Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mahalanodisc

Mahalanobis for AWC


Description

Vector of Mahalanobis distances or their root. For use in awcoord only.

Usage

mahalanodisc(x2, mg, covg, modus="square")

Arguments

x2

numerical data matrix.

mg

mean vector.

covg

covariance matrix.

modus

"md" (roots of Mahalanobis distances) or "square" (original squared form of Mahalanobis distances).

Details

The covariance matrix is inverted by use of solvecov, which can be expected to give reasonable results for singular within-class covariance matrices.

Value

vector of (rooted) Mahalanobis distances.

Author(s)

See Also

Examples

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))

fpc

Flexible Procedures for Clustering

v2.2-9
GPL
Authors
Christian Hennig <christian.hennig@unibo.it>
Initial release
2020-12-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.