Philip Leifeld
2007-Feb-07 19:20 UTC
[R] isoMDS - high stress value and strange configuration
Dear R users, I have a specific question about isoMDS. Imagine the following (fake) distance table: hamburg bremen berlin munich cologne hamburg 0 911 982 677 424 bremen 911 0 293 547 513 berlin 982 293 0 785 875 munich 677 547 785 0 375 cologne 424 513 875 375 0 Now if I try a non-metric multidimensional scaling on these dissimilarities using isoMDS (or metaMDS), the stress value is 6.34. Nevertheless, other programs (e.g. the Minissa routine implemented in UCINet) yield a stress value of 0.00, and the configuration looks completely different. I tried this with multiple distance matrices: One time UCINet computed a stress value of 0.21 while isoMDS produced a stress of 0.33, and again the configuration was completely different and apparently random (while the configuration in UCINet still made sense). Here is what I tried: isoMDS(cities, y = cmdscale(cities, k = 2), k = 2, maxit = 50) Please give me a hint on how to improve the results. I suppose the above command is not complete, or something is wrong with it, or maybe the input distances are not in the right format. Btw, the problem does not occur when I use the real distances between these cities, not some other numbers, so apparently three-digit numbers should be fine as input values? Thanks! Phil
Jari Oksanen
2007-Feb-08 07:51 UTC
[R] isoMDS - high stress value and strange configuration
> I have a specific question about isoMDS. Imagine the following (fake) > distance table: > > hamburg bremen berlin munich cologne > hamburg 0 911 982 677 424 > bremen 911 0 293 547 513 > berlin 982 293 0 785 875 > munich 677 547 785 0 375 > cologne 424 513 875 375 0 > > Now if I try a non-metric multidimensional scaling on these > dissimilarities using isoMDS (or metaMDS), the stress value is 6.34. > Nevertheless, other programs (e.g. the Minissa routine implemented in > UCINet) yield a stress value of 0.00, and the configuration looks > completely different.This indeed seems to be a case where NMDS is trapped in its starting configuration. Metric scaling (cmdscale) produces a cute "horseshoe", but the best NMDS solutions looks completely different. Any small change from the initial solution leads into a worse configuration, and you need a bigger change in the beginning. Using a random configuration seems to help:> isoMDS(dis, initMDS(dis))initial value 36.383132 iter 5 value 28.671652 iter 10 value 16.711327 iter 15 value 6.392572 iter 20 value 3.007208 final value 0.000000 converged $points [,1] [,2] hamburg 29.428121 -36.07858 bremen 2.740499 32.38745 berlin 1.984215 35.35429 munich -16.910941 -14.13750 cologne -13.844187 -15.24468 $stress [1] 1.56159e-14 In this case I generated the random configuration using function initMDS of vegan, but you can do that quite well by any other way. Another point (which does not matter here so much) is that isoMDS multiplies stress by 100, so that your stress of 6 would corresponde 0.06 in some other software (assuming they use the same stress). cheers, jari oksanen -- Jari Oksanen <jarioksa at sun3.oulu.fi>