# Multidimensional Scaling "eurodist"

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)

• 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. Apr 6, 2014 at 8:47
• 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? Apr 6, 2014 at 9:05
• 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) Apr 6, 2014 at 10:25
• 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 Apr 6, 2014 at 16:54

(You need library(MASS) in your code it seems.) From ?eurodist:
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,])