Mahalanobis distance in SPSS vs. R

Discuss statistics related things
Post Reply
User avatar
sjentsch
Posts: 7
Joined: Wed Nov 06, 2019 2:34 pm
Location: Bergen, Norway
Contact:

Mahalanobis distance in SPSS vs. R

Post by sjentsch »

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
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: Mahalanobis distance in SPSS vs. R

Post by jonathon »

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
sjentsch
Posts: 7
Joined: Wed Nov 06, 2019 2:34 pm
Location: Bergen, Norway
Contact:

Re: Mahalanobis distance in SPSS vs. R

Post by sjentsch »

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

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

Re: Mahalanobis distance in SPSS vs. R

Post by jonathon »

oh yup :)
DeborahA
Posts: 22
Joined: Tue Apr 14, 2020 11:38 am

Re: Mahalanobis distance in SPSS vs. R

Post by DeborahA »

Hi there,

Did you make any progress on this feature? I have a student asking about it.

Best

Deborah.
Post Reply