mahaldis
computes the Mahalanobis (1936) distances between individual objects. The Mahalanobis distance takes into account correlations among variables and does not depend on the scales of the variables.
mahaldis
builds on the fact that type-II principal component analysis (PCA) preserves the Mahalanobis distance among objects (Legendre and Legendre 2012). Therefore, mahaldis
first performs a type-II PCA on standardized variables, and then computes the Euclidean distances among (repositioned) objects whose positions are given in the matrix \(\mathbf{G}\). This is equivalent to the Mahalanobis distances in the space of the original variables (Legendre and Legendre 2012).