Learn R Programming

ICGE (version 0.3)

dmahal: Mahalanobis Distance

Description

dmahal computes and returns the Mahalanobis distance matrix between the rows of a data matrix.

Usage

dmahal(datos, S)

Arguments

datos

data matrix.

S

covariance matrix.

Value

A dist object with distance information.

References

Pe\~nA D. (2002) Analisis de Datos Multivariantes. Mc Graw Hill.

Everitt B. S. and Dunn G. (2001) Applied Multivariate Data Analysis. 2 edition, Edward Arnold, London.

See Also

dist, dbhatta, dgower, dcor, dproc2

Examples

Run this code
# NOT RUN {
#Generate 10 objects in dimension 2
mu <- rep(0, 2)
Sigma <- matrix(c(10,3,3,2),2,2)

x <- mvrnorm(n=10, rep(0, 2), Sigma)

d <- dmahal(x, Sigma)
# }

Run the code above in your browser using DataLab