2
$\begingroup$

I have a question regarding Multidimensional Scaling. I used the dataset eurodist from the package datasets to generate a 2 dimensional configuration of the distances between European cities. I expected a nearly exact representation of the location for the cities (although the points could be mirrored) because we have distance data here that are known a-priori to be accurate. There shouldn't be any conflicts inside the data, but actually my analysis shows THERE ARE!

Does anyone know the reason why we have stress inside the data?

library("datasets")

data(eurodist)

obj <- cmdscale(eurodist, k = 2)
plot(obj[,1], obj[,2], type = "n")
text(obj[,1], obj[,2], labels = rownames(obj))
sh <- Shepard(eurodist,obj)
plot(sh$x, sh$y, main="Shepard-Diagram")
abline(0, 1) 
$\endgroup$
4
  • 1
    $\begingroup$ I can't say anything about the R procedure you used. But here are some hypotheses: 1) You used stress (fit) by squared distances whereas you shouldn't; 2) You used nonmetric MDS which not always give the same results as metric even with euclidean distances; 3) your input distances are on earth's convex surface, but your map is flat; 4) some misspecification of the command. $\endgroup$
    – ttnphns
    Commented Apr 6, 2014 at 8:47
  • $\begingroup$ Thanks for your reply! The cmdscale-Function provides the metric approach and the stress is not measured by a parameter but visualized by a diagramm. It shows if and how unique distances in the plot differ from the distances in my original matrix. I think these are not the reasons for the result. Also I would exclude #4 :) For me your hypotheses 3 looks interessting. Someone who can confirm it? $\endgroup$
    – Diegoal
    Commented Apr 6, 2014 at 9:05
  • 1
    $\begingroup$ Is there any systematic nonlinearity on that Sheppard plot? Can you display it if you wish? (Well, leave a link, and I'll insert it) $\endgroup$
    – ttnphns
    Commented Apr 6, 2014 at 10:25
  • $\begingroup$ It's possible that you are getting a local minima but not global. If I remember correctly the objective function in multidimentional scalling is not convex. May be you can give an initial solution. You could try with the actual solution to see if everything is working properly $\endgroup$
    – Manuel
    Commented Apr 6, 2014 at 16:54

1 Answer 1

1
$\begingroup$

(You need library(MASS) in your code it seems.) From ?eurodist:

The data give the road distances (in km) between 21 cities in Europe. The data are taken from a table in The Cambridge Encyclopaedia.

This is in addition to problem (3) mentioned by ttnphns in the comments. Not only are they not flat distances, but they are not distances as the crow flies either. As one example, the outlier at (1662, 713) on the Shepard plot corresponds to the pair (Cologne, Geneva). (It is slightly difficult to find this because the author of Shepard doesn't seem to have bothered to document it.) Looking at the map of Europe, I think this journey has to be made by quite a wiggly route. You can see the outlier by plotting the distances for Cologne only:

plot(as.matrix(eurodist)[6,], as.matrix(dist(obj))[6,])
$\endgroup$
1
  • $\begingroup$ Thants it!The data give the road distances (in km) between 21 cities in Europe. The data are taken from a table in The Cambridge Encyclopaedia. Thanks a lot! $\endgroup$
    – Diegoal
    Commented Apr 7, 2014 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.