Skip to main content
Post Closed as "Duplicate" by amoeba, Sven Hohenstein, gung - Reinstate Monica r
Tweeted twitter.com/#!/StackStats/status/421455644303302656
deleted 23 characters in body; edited title
Source Link
user88
user88

Pairwise Mahalanobis Distancedistance in R

I'm trying to calculate a Mahalanobis-type pairwise distance matrix in R. I have 33 individuals, each with 10 variables. The idea is to get a distance matrix D, where

D(i,j) = (Xi-Xj)W-1(Xi-Xj)'

$$D_{i,j}=(\mathbf{X}_i-\mathbf{X}_j)W^{-1}(\mathbf{X}_i-\mathbf{X}_j)^T$$

However I haven't been able build proper code for it.

Pairwise Mahalanobis Distance in R

I'm trying to calculate a Mahalanobis-type pairwise distance matrix in R. I have 33 individuals, each with 10 variables. The idea is to get a distance matrix D, where

D(i,j) = (Xi-Xj)W-1(Xi-Xj)'

However I haven't been able build proper code for it.

Pairwise Mahalanobis distance in R

I'm trying to calculate a Mahalanobis-type pairwise distance matrix in R. I have 33 individuals, each with 10 variables. The idea is to get a distance matrix D, where

$$D_{i,j}=(\mathbf{X}_i-\mathbf{X}_j)W^{-1}(\mathbf{X}_i-\mathbf{X}_j)^T$$

However I haven't been able build proper code for it.

Post Migrated Here from stackoverflow.com (revisions)
Source Link
Javier
Javier

Pairwise Mahalanobis Distance in R

I'm trying to calculate a Mahalanobis-type pairwise distance matrix in R. I have 33 individuals, each with 10 variables. The idea is to get a distance matrix D, where

D(i,j) = (Xi-Xj)W-1(Xi-Xj)'

However I haven't been able build proper code for it.