계량적 MDS(Metric MDS)
개념
- 데이터가 구간척도이거나 비율척도인 경우에 활용
[cmdscale]
> library(MASS) > eurodist Athens Barcelona Brussels Calais Cherbourg Cologne Copenhagen Geneva Gibraltar Barcelona 3313 Brussels 2963 1318 Calais 3175 1326 204 Cherbourg 3339 1294 583 460 Cologne 2762 1498 206 409 785 Copenhagen 3276 2218 966 1136 1545 760 Geneva 2610 803 677 747 853 1662 1418 Gibraltar 4485 1172 2256 2224 2047 2436 3196 1975 Hamburg 2977 2018 597 714 1115 460 460 1118 2897 Hook of Holland 3030 1490 172 330 731 269 269 895 2428 Lisbon 4532 1305 2084 2052 1827 2290 2971 1936 676 Lyons 2753 645 690 739 789 714 1458 158 1817 Madrid 3949 636 1558 1550 1347 1764 2498 1439 698 Marseilles 2865 521 1011 1059 1101 1035 1778 425 1693 Milan 2282 1014 925 1077 1209 911 1537 328 2185 Munich 2179 1365 747 977 1160 583 1104 591 2565 Paris 3000 1033 285 280 340 465 1176 513 1971 Rome 817 1460 1511 1662 1794 1497 2050 995 2631 Stockholm 3927 2868 1616 1786 2196 1403 650 2068 3886 Vienna 1991 1802 1175 1381 1588 937 1455 1019 2974 Hamburg Hook of Holland Lisbon Lyons Madrid Marseilles Milan Munich Paris Rome Barcelona Brussels Calais Cherbourg Cologne Copenhagen Geneva Gibraltar Hamburg Hook of Holland 550 Lisbon 2671 2280 Lyons 1159 863 1178 Madrid 2198 1730 668 1281 Marseilles 1479 1183 1762 320 1157 Milan 1238 1098 2250 328 1724 618 Munich 805 851 2507 724 2010 1109 331 Paris 877 457 1799 471 1273 792 856 821 Rome 1751 1683 2700 1048 2097 1011 586 946 1476 Stockholm 949 1500 3231 2108 3188 2428 2187 1754 1827 2707 Vienna 1155 1205 2937 1157 2409 1363 898 428 1249 1209 Stockholm Barcelona Brussels Calais Cherbourg Cologne Copenhagen Geneva Gibraltar Hamburg Hook of Holland Lisbon Lyons Madrid Marseilles Milan Munich Paris Rome Stockholm Vienna 2105
> data <- cmdscale(eurodist)
> data
[,1] [,2]
Athens 2290.274680 1798.80293
Barcelona -825.382790 546.81148
Brussels 59.183341 -367.08135
Calais -82.845973 -429.91466
Cherbourg -352.499435 -290.90843
Cologne 293.689633 -405.31194
Copenhagen 681.931545 -1108.64478
Geneva -9.423364 240.40600
Gibraltar -2048.449113 642.45854
Hamburg 561.108970 -773.36929
Hook of Holland 164.921799 -549.36704
Lisbon -1935.040811 49.12514
Lyons -226.423236 187.08779
Madrid -1423.353697 305.87513
Marseilles -299.498710 388.80726
Milan 260.878046 416.67381
Munich 587.675679 81.18224
Paris -156.836257 -211.13911
Rome 709.413282 1109.36665
Stockholm 839.445911 -1836.79055
Vienna 911.230500 205.93020
> x <- data[,1]
> y <- data[,2]
> plot(x,y,type="n", asp=1, main="Metric MDS")
> text(x,y,rownames(data), cex=0.7)
> abline(v=0, h=0, lty=2, lwd=0.5)