Mahalanobis distance in SPSS vs. R

Discuss statistics related things

by sjentsch » 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/ds5_spss_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
User avatar
sjentsch
 
Posts: 5
Joined: Wed Nov 06, 2019 2:34 pm
Location: Bergen, Norway

by jonathon » Mon May 04, 2020 1:09 am

hey wait ... this is about spss and R ... is there anything jamovi related here? do you need to be posting in the off-topic forum :P

jonathon
User avatar
jonathon
 
Posts: 1341
Joined: Fri Jan 27, 2017 10:04 am

by sjentsch » Mon May 04, 2020 10:31 am

I intend to get Mahalanobis into jamovi. Is this sufficient? ;-)

S
User avatar
sjentsch
 
Posts: 5
Joined: Wed Nov 06, 2019 2:34 pm
Location: Bergen, Norway

by jonathon » Mon May 04, 2020 10:51 am

oh yup :)
User avatar
jonathon
 
Posts: 1341
Joined: Fri Jan 27, 2017 10:04 am


Return to Statistics