Mahalanobis distance in SPSS vs. R
Posted: Sun May 03, 2020 5:33 pm
Hei,
one can use the Mahalanobis-distance in order to check for multivariate outliers. The data set I am using is Album Sales.sav from Field (2018). http://study.sagepub.com/sites/default/ ... _files.zip
When calculating it using SPSS: Analyze → Regression (DV: Sales; IV: Adverts, Airplay, Image) → Save → Mahalanobis I get Mahalanobis distances that are different but still relatively highly correlated (0.873) to those I get from R using mahalanobis(data[, 2:4], colMeans(data[, 2:4]), cov(data[, 2:4]))
I wanted to add that I get the identical results from mahalanobis in vanilla R and the one implemented in the psych-package.
Any thoughts?
Thanks a lot,
Sebastian
one can use the Mahalanobis-distance in order to check for multivariate outliers. The data set I am using is Album Sales.sav from Field (2018). http://study.sagepub.com/sites/default/ ... _files.zip
When calculating it using SPSS: Analyze → Regression (DV: Sales; IV: Adverts, Airplay, Image) → Save → Mahalanobis I get Mahalanobis distances that are different but still relatively highly correlated (0.873) to those I get from R using mahalanobis(data[, 2:4], colMeans(data[, 2:4]), cov(data[, 2:4]))
I wanted to add that I get the identical results from mahalanobis in vanilla R and the one implemented in the psych-package.
Any thoughts?
Thanks a lot,
Sebastian