1. PENDAHULUAN

1.1 Latar Bekalang

Sarana kesehatan merupakan salah satu komponen penting dalam penyelenggaraan pelayanan kesehatan dan peningkatan derajat kesehatan masyarakat. Salah satu indikator penting dalam menilai kemajuan pembangunan sektor kesehatan adalah ketersediaan sarana dan fasilitas pelayanan kesehatan, seperti rumah sakit, puskesmas, poliklinik, puskesmas pembantu, apotek, dan fasilitas pendukung lainnya. Jumlah dan pemerataan sarana kesehatan antar provinsi menjadi aspek penting yang menentukan aksesibilitas masyarakat terhadap layanan kesehatan yang bermutu.

Indonesia merupakan negara yang memiliki wilayah geografis yang luas dan memiliki jumlah provinsi yang beragam. Hal ini memberikan tantangan yang cukup besar dalam pemerataan sarana kesehatan. Kondisi ini berpotensi menimbulkan berbagai masalah, mulai dari rendahnya akses terhadap pelayanan medis dasar, keterlambatan penanganan penyakit, hingga meningkatnya angka kesakitan dan kematian yang dapat dicegah.Oleh sebab itu, ketimpangan sarana kesehatan antarprovinsi di Indonesia menjadi isu penting untuk diteliti. Dengan adanya analisis yang mampu memetakan hubungan antarprovinsi secara visual akan memberikan gambaran mengenai kedekatan karakteristik antarwilayah.

1.2 Data

Data yang digunakan dalam penelitian ini merupakan data sarana kesehatan yang memuat informasi mengenai jumlah fasilitas kesehatan yang tersebar di seluruh provinsi di Indonesia. Data tersebut memuat variabel rumah sakit, rumah sakit bersalin, poliklinik, puskesmas, puskesmas pembantu, dan apotek yang merepresentasikan ketersediaan fasilitas di tiap-tiap wilayah. Beberapa provinsi tercatat memiliki jumlah fasilitas kesehatan yang sangat banyak, terutama provinsi dengan penduduk dan wilayah luas. Namun disisi lain terdapat provinsi yang memiliki jumlah fasilitas relatif lebih sedikit. Variasi ini penting dan dapat dianalisis untuk mengetahui pola kesamaan atau perbedaan kondisi sarana kesehatan antar provinsi di Indonesia.

1.3 Cuplikan Data

Berikut data yang digunakan pada kasus ini:

Provinsi Rumah Sakit Rumah Sakit Bersalin Poliklinik Puskesmas Puskesmas Pembantu Apotek
ACEH 64 255 258 395 971 346
SUMATERA UTARA 199 441 800 661 1887 740
SUMATERA BARAT 54 139 127 294 721 257
RIAU 55 207 329 272 1033 351
JAMBI 36 151 103 231 654 211
SUMATERA SELATAN 65 248 195 403 935 244
BENGKULU 20 5 49 190 456 141
LAMPUNG 53 238 307 350 936 356
KEP. BANGKA BELITUNG 21 25 25 63 148 73
KEPULAUAN RIAU 23 35 76 88 243 90
DKI JAKARTA 119 156 230 257 3 242
JAWA BARAT 292 1245 1670 1170 1800 1758
JAWA TENGAH 274 871 1232 921 1832 2068
DI YOGYAKARTA 61 102 158 126 300 226
JAWA TIMUR 317 1183 1101 1036 2338 1842
BANTEN 87 280 467 267 346 402
BALI 49 61 71 124 495 214
NTB 31 20 72 173 550 237
NTT 48 42 108 414 1030 172
KALIMANTAN BARAT 39 95 98 264 836 123
KALIMANTAN TENGAH 19 63 95 221 1101 85
KALIMANTAN SELATAN 34 126 131 253 464 162
KALIMANTAN TIMUR 39 56 125 199 727 196
KALIMANTAN UTARA 11 4 15 59 179 49
SULAWESI UTARA 46 77 68 217 540 170
SEULAWESI TENGAH 29 58 60 224 698 181
SULAWESI SELATAN 75 121 180 493 1394 490
SULAWESI TENGGARA 31 56 40 283 557 189
GORONTALO 14 2 42 96 250 97
SULAWESI BARAT 10 8 16 100 340 47
MALUKU 27 20 31 235 481 66
MALUKU UTARA 20 11 28 142 277 76
PAPUA BARAT 16 10 29 177 495 79
PAPUA 41 26 115 422 1146 125

1.4 Latar Belakang Metode

Multidimensional Scaling (MDS) merupakan teknik yang digunakan untuk mencari hubungan antara data secara spasial yang membentuk sebuah grafik untuk menggambarkan posisi sebuah objek dengan objek yang lain berdasarkan kemiripan objek-objek tersebut (Pradita dkk., 2019). MDS akan menyederhanakan struktur data yang kompleks ke ruang dimensi rendah berdasarkan tingkat kemiripan atau ketidaksamaannya. Kelebihan MDS adalah fleksibilitasnya dalam menangani berbagai jenis data baik metrik maupun nonmetrik. Hal ini menjadikan MDS menjadi metode relevan di berbagai bidang.

1.5 Tujuan

Tujuan dari penelitian ini adalah sebagai berikut:

  1. Mengukur tingkat kemiripan dan perbedaan antar provinsi di Indonesia dalam hal ketersediaan sarana kesehatan menggunakan matriks jarak ketidaksamaan MDS.
  2. Memetakan provinsi-provinsi di Indonesia ke ruang dua dimensi berdasarkan kondisi fasilitas kesehatan.
  3. Mengidentifikasi kelompok provinsi yang memiliki karakteristik sarana kesehatan yang mirip melalui kedekatannya pada hasil pemetaan MDS.
  4. Memberikan gambaran visual mengenai pola penyebaran sarana kesehatan antar provinsi,untuk mengetahui provinsi mana yang berada pada posisi lebih maju, rata-rata, atau tertinggal dalam penyediaan sarana kesehatan.

1.6 Tinjauan Pustaka

1.6.1 Definisi MDS

Multidimensional Scaling (MDS) merupakan teknik analisis multivariat yang berfungsi untuk menentukan posisi suatu objek dengan mengacu pada kesamaan atau ketidaksamaannya (Mahida, 2020). Analisis ini dapat digunakan untuk mengetahui keberlanjutan tiap dimensi dan keseimbangan antar dimensi (Mahida, 2020).

1.6.2 Jenis MDS

Menurut Kuswandari dkk. 2021, MDS dibagi menjadi dua, yaitu sebagai berikut:

  1. MDS Metrik

    Data jarak yang digunakan dalam MDS metrik adalah interval atau rasio. MDS metrik digunakan untuk menentukan himpunan titik dalam ruang n dengan masing-masing titik mewakili suatu objek.

  2. MDS Non-Metrik

    Data jarak yang digunakan dalam MDS non-metrik adalah nominal atau ordinal. Pada MDS non-metrik perhitungan dilakukan dengan memperhatikan peringkat jarak.

1.6.3 Validitas Model

Analisis kelayakan atau validitas model pada MDS mengacu pada besaran nilai STRESS dan koefisien determinasi (\(R^2\)).

  1. STRESS
    STRESS adalah ukuran yang menunjukkan ketidakcocokan, dimana jika nilai stress semakin tinggi maka model MDS semakin tidak cocok (Aswin dan Wahidun, 2016). Kriteria nilai stress adalah sebagai berikut:

    Stress (%) Kriteria MDS
    ≥ 20% Jelek
    10% - 20% Cukup
    5% - 10% Baik
    2.5% - 5% Sangat Baik
    < 2.5% Sempurna
  2. Koefisien Determiasi (\(R^2\))

    \(R^2\) adalah koefisien korelasi kuadrat yang menunjukkan proporsi varians dari data jarak asli yang dijelaskan oleh model spasial MDS. Nilai \(R^2\) berkisar antara 0 hingga 1, yang mana semakin tinggi nilai \(R^2\), maka semakin baik pula model spasial MDS. Namun, secara umum tingkat minimum yang dapat diterima dari \(R^2\) adalah 0.6.

2. SOURCE CODE

2.1 Library

  1. readxl

    Library ini digunakan untuk membaca data dari excel ke dalam R.

  2. dplyr

    Library ini digunakan untuk mengatur dataset agar kolom koordinat MDS dapat digabung dengan label daerah, data bersih sebelum dihitung MDS, dan memfilter variabel yang akan digunakan.

  3. ggplot2

    Library ini digunakan untuk memvisualisasikan MDS dalam bentuk scatter plot. Dengan library ini visualisasi dari grafik akan lebih rapi dan koordinat yang ditampilkan MDS akan membentuk titik yang mewakili objek.

  4. MASS

    Library ini digunakan untuk multidimensional scaling. Library ini menyediakan fungsi isoMDS() yang digunakan untuk Non-Metrik MDS dan fungsi sammon() yang digunakan untuk sammon mapping.

2.2 Code

#data
data <- read_excel("C:/Users/ACER/Downloads/DATA_SARANA_KESEHATAN.xlsx")
data_num <- data %>% select_if(is.numeric)

#rownames
labels <- rownames(data_num)
if (is.null(labels)) labels <- paste0("Obs_", 1:nrow(data_num))
rownames(data_num) <- labels
## Warning: Setting row names on a tibble is deprecated.
head(data_num)
## # A tibble: 6 × 6
##   `Rumah Sakit` `Rumah Sakit Bersalin` Poliklinik Puskesmas `Puskesmas Pembantu`
##           <dbl>                  <dbl>      <dbl>     <dbl>                <dbl>
## 1            64                    225        258       395                  971
## 2           199                    441        800       661                 1887
## 3            54                    139        127       294                  721
## 4            55                    207        329       272                 1033
## 5            36                    151        103       231                  654
## 6            65                    248        195       403                  935
## # ℹ 1 more variable: Apotek <dbl>
#matrik jarak D
D <- dist(data_num, method = "euclidean")
D_mat <- as.matrix(D)
D_mat
##             1         2         3         4         5         6          7
## 1     0.00000 1193.1861  324.4673  156.3458  419.3984  127.5265  665.80177
## 2  1193.18607    0.0000 1514.1638 1152.9488 1606.7072 1280.6694 1847.84767
## 3   324.46726 1514.1638    0.0000  389.9910  107.7868  272.8956  345.96676
## 4   156.34577 1152.9488  389.9910    0.0000  468.5029  240.7301  710.05774
## 5   419.39838 1606.7072  107.7868  468.5029    0.0000  358.2569  265.09055
## 6   127.52647 1280.6694  272.8956  240.7301  358.2569    0.0000  606.47259
## 7   665.80177 1847.8477  345.9668  710.0577  265.0906  606.4726    0.00000
## 8    77.72387 1205.8822  318.3771  130.2574  405.1962  167.7558  651.28105
## 9   978.88712 2152.2033  663.3513 1015.3256  570.5164  919.1164  341.45864
## 10  872.16627 2042.9276  559.6311  905.9216  467.2954  814.3089  244.97347
## 11  987.65075 2091.2200  729.5485 1043.7931  669.6872  950.0258  534.09924
## 12 2523.43773 1647.7072 2800.9547 2511.2220 2882.0317 2617.2262 3101.71727
## 13 2322.36367 1487.0635 2590.8338 2304.7683 2676.1760 2430.4502 2890.50636
## 14  749.75996 1901.3466  456.9519  783.9209  377.6467  709.2101  242.13220
## 15 2491.98876 1487.7900 2790.2077 2475.2790 2878.1993 2584.8147 3119.87788
## 16  676.29875 1671.3812  546.7623  707.1011  533.2720  682.5489  583.94178
## 17  616.06087 1789.1478  301.7781  646.5547  214.5507  568.2799  125.16789
## 18  562.24194 1736.1368  248.9920  598.0635  181.6673  519.0790  138.62179
## 19  300.60439 1333.7721  356.2471  358.2304  434.0922  254.2125  621.48773
## 20  358.10613 1510.3043  187.3046  396.2550  212.4312  277.9514  401.32530
## 21  412.47424 1383.0148  432.8256  393.4069  473.1617  363.7334  652.38256
## 22  581.29081 1760.5363  278.1007  637.2197  200.9925  520.5824  161.35365
## 23  409.05623 1576.2075  141.0674  433.2009  126.8700  360.0333  292.03596
## 24  969.05521 2144.6881  651.8213 1003.8078  558.0600  907.0551  321.85711
## 25  553.84926 1740.1649  231.6204  603.2719  147.2209  491.7601  121.84827
## 26  446.44485 1624.9185  151.2614  488.5356  115.8965  384.4477  253.63557
## 27  475.69948  914.3025  741.8848  477.9958  838.1140  543.8299 1061.64778
## 28  534.56805 1723.2046  215.9352  599.8658  160.0500  471.5443  154.78049
## 29  877.56937 2052.7915  560.5702  913.5951  469.9394  819.5175  230.87226
## 30  826.53252 2006.5007  508.2470  861.3037  413.9408  759.8085  177.73576
## 31  662.58811 1846.8281  348.8094  715.4404  270.9170  588.5134   94.19660
## 32  848.04304 2028.6158  529.4733  891.2368  440.1772  784.4692  197.60314
## 33  668.10104 1850.0086  352.3322  709.0719  267.1666  598.7504   77.29812
## 34  375.19861 1284.8506  476.9853  406.3225  549.3041  339.5630  731.72263
##             8          9         10        11        12        13        14
## 1    77.72387  978.88712  872.16627  987.6507 2523.4377 2322.3637  749.7600
## 2  1205.88225 2152.20329 2042.92756 2091.2200 1647.7072 1487.0635 1901.3466
## 3   318.37713  663.35134  559.63113  729.5485 2800.9547 2590.8338  456.9519
## 4   130.25744 1015.32556  905.92163 1043.7931 2511.2220 2304.7683  783.9209
## 5   405.19625  570.51643  467.29541  669.6872 2882.0317 2676.1760  377.6467
## 6   167.75577  919.11642  814.30891  950.0258 2617.2262 2430.4502  709.2101
## 7   651.28105  341.45864  244.97347  534.0992 3101.7173 2890.5064  242.1322
## 8     0.00000  953.58219  845.64709  953.4899 2512.6558 2316.2375  715.7744
## 9   953.58219    0.00000  112.44554  394.9835 3325.9050 3128.6769  275.1363
## 10  845.64709  112.44554    0.00000  396.0278 3233.3410 3038.0137  189.3304
## 11  953.48991  394.98354  396.02778    0.0000 3106.5228 2942.7312  342.1842
## 12 2512.65577 3325.90499 3233.34100 3106.5228    0.0000  700.8345 3054.9818
## 13 2316.23747 3128.67688 3038.01366 2942.7312  700.8345    0.0000 2856.9597
## 14  715.77441  275.13633  189.33040  342.1842 3054.9818 2856.9597    0.0000
## 15 2497.50936 3385.04741 3288.19069 3235.9913  801.6770  660.8260 3117.1054
## 16  620.98712  673.65125  597.49142  464.6698 2681.1788 2526.0528  425.2223
## 17  593.93771  384.97662  285.57486  547.4879 3032.9496 2813.3148  218.0986
## 18  545.63633  450.48196  351.26628  597.9080 2998.7164 2772.0821  282.5774
## 19  353.31289  958.55777  856.77710 1056.9763 2761.5975 2548.8747  790.5878
## 20  368.79669  725.80851  622.93980  857.6969 2877.6814 2673.9572  566.6410
## 21  440.49064  969.36319  868.92980 1126.2429 2853.1402 2639.5659  823.2624
## 22  560.09821  406.79602  304.42897  486.6857 2976.6167 2788.4243  221.7093
## 23  398.15324  616.56387  510.79448  746.3786 2898.0630 2681.7144  438.4598
## 24  945.39040   46.84015  106.97663  434.0760 3337.7702 3139.0701  288.1180
## 25  540.54787  438.14039  337.05638  577.0329 3001.4491 2793.6714  279.2257
## 26  443.99324  585.20338  484.37898  731.0533 2943.8898 2725.2728  427.3137
## 27  527.70352 1395.51496 1292.18497 1434.4832 2400.3237 2138.6718 1184.1714
## 28  530.01509  480.02396  384.99740  603.5271 2988.6989 2776.2291  330.1621
## 29  854.18675  113.73654   49.87986  421.9479 3253.8614 3050.7460  213.7896
## 30  807.85333  198.49433  126.09520  505.7905 3247.9886 3045.9263  256.7450
## 31  654.77172  374.99200  284.77184  571.4062 3119.9393 2920.8581  307.0033
## 32  828.49502  151.97697   84.59905  432.9977 3240.1143 3040.8325  223.9353
## 33  657.09664  365.65968  272.81679  589.3717 3130.8780 2924.4350  298.9398
## 34  429.64753 1065.87523  964.42522 1176.2534 2760.5970 2551.6365  906.3984
##          15        16         17         18        19        20        21
## 1  2491.989  676.2988  616.06087  562.24194  300.6044  358.1061  412.4742
## 2  1487.790 1671.3812 1789.14784 1736.13680 1333.7721 1510.3043 1383.0148
## 3  2790.208  546.7623  301.77806  248.99197  356.2471  187.3046  432.8256
## 4  2475.279  707.1011  646.55472  598.06354  358.2304  396.2550  393.4069
## 5  2878.199  533.2720  214.55069  181.66728  434.0922  212.4312  473.1617
## 6  2584.815  682.5489  568.27986  519.07899  254.2125  277.9514  363.7334
## 7  3119.878  583.9418  125.16789  138.62179  621.4877  401.3253  652.3826
## 8  2497.509  620.9871  593.93771  545.63633  353.3129  368.7967  440.4906
## 9  3385.047  673.6512  384.97662  450.48196  958.5578  725.8085  969.3632
## 10 3288.191  597.4914  285.57486  351.26628  856.7771  622.9398  868.9298
## 11 3235.991  464.6698  547.48790  597.90802 1056.9763  857.6969 1126.2429
## 12  801.677 2681.1788 3032.94955 2998.71639 2761.5975 2877.6814 2853.1402
## 13  660.826 2526.0528 2813.31477 2772.08207 2548.8747 2673.9572 2639.5659
## 14 3117.105  425.2223  218.09860  282.57742  790.5878  566.6410  823.2624
## 15    0.000 2811.2791 3044.73069 3001.82345 2692.0139 2841.4760 2763.4549
## 16 2811.279    0.0000  533.11819  551.75901  854.0556  700.4570  928.8310
## 17 3044.731  533.1182    0.00000   89.22444  611.4082  382.2918  628.3041
## 18 3001.823  551.7590   89.22444    0.00000  542.9319  330.8141  575.7873
## 19 2692.014  854.0556  611.40821  542.93186    0.0000  255.9824  226.5171
## 20 2841.476  700.4570  382.29177  330.81415  255.9824    0.0000  273.7718
## 21 2763.455  928.8310  628.30407  575.78729  226.5171  273.7718    0.0000
## 22 3014.233  459.5008  168.39240  184.78907  595.1118  376.9629  646.6931
## 23 2881.874  601.3859  250.62721  194.56361  373.0630  153.8993  392.4666
## 24 3390.241  694.2752  373.00804  435.75911  936.3851  703.6363  942.1088
## 25 3010.468  544.1057  113.50771  100.07497  530.7937  305.4619  568.8726
## 26 2922.348  626.8102  229.84342  170.97661  386.4272  164.0762  415.9135
## 27 2246.895 1124.6857 1018.18220  950.02421  502.0110  712.1727  581.0189
## 28 2991.492  570.7775  176.23847  129.51062  496.2741  295.8158  560.1910
## 29 3300.973  628.2675  282.92225  342.11402  849.8594  620.2467  864.0168
## 30 3277.533  661.2594  244.63238  298.74738  775.4902  542.0535  777.5301
## 31 3134.612  627.2488  195.41238  198.85422  592.9013  374.6638  625.2727
## 32 3283.114  629.4704  268.48091  321.79030  811.3902  584.7145  832.1610
## 33 3139.811  635.9363  162.75134  173.72104  599.4431  371.8884  613.4998
## 34 2670.762  965.0337  723.70643  657.07382  126.8188  355.1366  215.1255
##           22         23         24         25         26        27         28
## 1   581.2908  409.05623  969.05521  553.84926  446.44485  475.6995  534.56805
## 2  1760.5363 1576.20747 2144.68809 1740.16493 1624.91846  914.3025 1723.20457
## 3   278.1007  141.06736  651.82129  231.62038  151.26136  741.8848  215.93518
## 4   637.2197  433.20088 1003.80775  603.27191  488.53557  477.9958  599.86582
## 5   200.9925  126.87001  558.06003  147.22092  115.89651  838.1140  160.04999
## 6   520.5824  360.03333  907.05513  491.76010  384.44766  543.8299  471.54427
## 7   161.3536  292.03596  321.85711  121.84827  253.63557 1061.6478  154.78049
## 8   560.0982  398.15324  945.39040  540.54787  443.99324  527.7035  530.01509
## 9   406.7960  616.56387   46.84015  438.14039  585.20338 1395.5150  480.02396
## 10  304.4290  510.79448  106.97663  337.05638  484.37898 1292.1850  384.99740
## 11  486.6857  746.37859  434.07603  577.03293  731.05335 1434.4832  603.52713
## 12 2976.6167 2898.06297 3337.77021 3001.44915 2943.88977 2400.3237 2988.69888
## 13 2788.4243 2681.71438 3139.07009 2793.67142 2725.27283 2138.6718 2776.22910
## 14  221.7093  438.45980  288.11803  279.22572  427.31370 1184.1714  330.16208
## 15 3014.2334 2881.87352 3390.24070 3010.46757 2922.34752 2246.8952 2991.49210
## 16  459.5008  601.38590  694.27516  544.10569  626.81018 1124.6857  570.77754
## 17  168.3924  250.62721  373.00804  113.50771  229.84342 1018.1822  176.23847
## 18  184.7891  194.56361  435.75911  100.07497  170.97661  950.0242  129.51062
## 19  595.1118  373.06300  936.38507  530.79375  386.42722  502.0110  496.27412
## 20  376.9629  153.89932  703.63627  305.46195  164.07620  712.1727  295.81582
## 21  646.6931  392.46656  942.10880  568.87257  415.91345  581.0189  560.19104
## 22    0.0000  279.64621  400.62326  116.83321  256.21866 1016.9518  153.19269
## 23  279.6462    0.00000  597.57928  199.26866   77.58866  791.3956  208.07210
## 24  400.6233  597.57928    0.00000  423.42532  565.04425 1379.8812  465.17631
## 25  116.8332  199.26866  423.42532    0.00000  160.77313  960.8397   80.34924
## 26  256.2187   77.58866  565.04425  160.77313    0.00000  820.2091  154.38264
## 27 1016.9518  791.39560 1379.88115  960.83974  820.20912    0.0000  927.91756
## 28  153.1927  208.07210  465.17631   80.34924  154.38264  927.9176    0.00000
## 29  313.6351  508.30011   97.24197  333.75890  477.31436 1287.5248  375.35450
## 30  282.3739  443.61808  166.20469  278.53007  407.79039 1226.9898  322.58797
## 31  176.3916  298.30857  351.05128  140.00000  250.44760 1055.7533  156.85025
## 32  280.5637  481.60565  132.36691  300.43635  445.31337 1257.1853  336.66007
## 33  194.4479  282.59158  339.02360  137.17143  239.28226 1056.2107  172.16852
## 34  710.8861  480.97297 1041.16185  645.07441  497.22932  462.7915  613.97313
##            29         30         31         32         33        34
## 1   877.56937  826.53252  662.58811  848.04304  668.10104  375.1986
## 2  2052.79151 2006.50069 1846.82809 2028.61578 1850.00865 1284.8506
## 3   560.57025  508.24699  348.80940  529.47332  352.33223  476.9853
## 4   913.59510  861.30366  715.44042  891.23678  709.07193  406.3225
## 5   469.93936  413.94082  270.91696  440.17724  267.16661  549.3041
## 6   819.51754  759.80853  588.51338  784.46925  598.75037  339.5630
## 7   230.87226  177.73576   94.19660  197.60314   77.29812  731.7226
## 8   854.18675  807.85333  654.77172  828.49502  657.09664  429.6475
## 9   113.73654  198.49433  374.99200  151.97697  365.65968 1065.8752
## 10   49.87986  126.09520  284.77184   84.59905  272.81679  964.4252
## 11  421.94786  505.79047  571.40616  432.99769  589.37170 1176.2534
## 12 3253.86140 3247.98861 3119.93926 3240.11435 3130.87799 2760.5970
## 13 3050.74597 3045.92630 2920.85809 3040.83245 2924.43499 2551.6365
## 14  213.78962  256.74501  307.00326  223.93526  298.93979  906.3984
## 15 3300.97258 3277.53322 3134.61242 3283.11361 3139.81098 2670.7621
## 16  628.26746  661.25940  627.24875  629.47041  635.93632  965.0337
## 17  282.92225  244.63238  195.41238  268.48091  162.75134  723.7064
## 18  342.11402  298.74738  198.85422  321.79030  173.72104  657.0738
## 19  849.85940  775.49017  592.90134  811.39017  599.44307  126.8188
## 20  620.24673  542.05350  374.66385  584.71446  371.88842  355.1366
## 21  864.01678  777.53006  625.27274  832.16104  613.49980  215.1255
## 22  313.63514  282.37387  176.39161  280.56372  194.44794  710.8861
## 23  508.30011  443.61808  298.30857  481.60565  282.59158  480.9730
## 24   97.24197  166.20469  351.05128  132.36691  339.02360 1041.1619
## 25  333.75890  278.53007  140.00000  300.43635  137.17143  645.0744
## 26  477.31436  407.79039  250.44760  445.31337  239.28226  497.2293
## 27 1287.52476 1226.98981 1055.75329 1257.18535 1056.21068  462.7915
## 28  375.35450  322.58797  156.85025  336.66007  172.16852  613.9731
## 29    0.00000  106.50822  272.50138   59.99167  259.12738  957.3453
## 30  106.50822    0.00000  197.80040   82.62566  176.59841  877.7756
## 31  272.50138  197.80040    0.00000  224.73095   62.88084  698.5435
## 32   59.99167   82.62566  224.73095    0.00000  220.85289  918.8019
## 33  259.12738  176.59841   62.88084  220.85289    0.00000  703.0071
## 34  957.34529  877.77560  698.54348  918.80194  703.00711    0.0000
#kuadrat jarak
D2 <- D_mat^2
n <- nrow(D2)

#nilai eigen dan vektor eigen
J <- diag(n) - (1/n) * matrix(1, n, n)
B <- -0.5 * J %*% D2 %*% J
B
##              [,1]       [,2]        [,3]        [,4]        [,5]         [,6]
##  [1,]   48039.032   261526.9  -13535.380   51089.944  -31122.880   42664.0026
##  [2,]  261526.885  1898707.7 -181907.527  324000.797 -308595.027  156072.8555
##  [3,]  -13535.380  -181907.5   30169.208  -21669.468   42080.708    4624.5908
##  [4,]   51089.944   324000.8  -21669.468   78584.856  -37649.968   37092.9144
##  [5,]  -31122.880  -308595.0   42080.708  -37649.968   65610.208   -4592.9092
##  [6,]   42664.003   156072.9    4624.591   37092.914   -4592.909   53551.9732
##  [7,]  -79245.292  -639535.4   73619.297  -94417.380  116049.797  -38747.3209
##  [8,]   38415.973   239694.8  -18180.439   48225.885  -31869.939   30121.9438
##  [9,] -149874.027 -1061419.2  100283.561 -170934.115  175277.061  -90395.0562
## [10,] -128144.233  -909249.4   86664.356 -142881.321  151795.856  -76600.2621
## [11,] -159581.674  -933120.8   53089.914 -201333.762  112690.414 -120372.7033
## [12,]  310075.650  3061809.5 -437663.762  356099.561 -650323.262   71764.6202
## [13,]  276567.591  2792909.4 -391890.821  332548.503 -598919.321   22466.5614
## [14,] -112041.880  -713197.0   55690.708 -122964.968  106505.208  -79704.9092
## [15,]  399609.885  3323188.7 -396950.527  456383.797 -628616.027  166736.8555
## [16,]  -84398.792  -327131.9  -14118.203  -90431.880   10887.297  -85888.8209
## [17,]  -75052.380  -560477.5   60243.208  -79030.468  100482.708  -44001.4092
## [18,]  -61852.850  -485546.0   56271.738  -67361.939   88489.238  -35759.8798
## [19,]   55092.032   136133.9   27882.620   51381.944   14841.120   70718.0026
## [20,]    6858.826  -144196.3   44502.414    7742.738   57200.914   35106.7967
## [21,]   56222.473   110259.3   38686.061   79178.385   38134.561   77895.4438
## [22,]  -67868.821  -523329.0   53475.767  -86670.909   89667.267  -31665.8503
## [23,]  -21997.409  -255214.6   42781.179  -16892.497   62403.679    -389.4386
## [24,] -144513.968 -1049489.1  103649.620 -163522.056  178090.120  -83597.9974
## [25,]  -57835.233  -493213.4   59780.356  -71156.321   93487.856  -22618.2621
## [26,]  -26269.850  -321459.0   53011.738  -30673.939   75456.238    2243.1202
## [27,]  134767.444   755272.3  -36218.968  148945.356  -94519.468  102793.4144
## [28,]  -50502.821  -467004.0   60129.767  -72267.909   88356.267  -16041.8503
## [29,] -127679.409  -924257.6   91330.179 -144670.497  155748.679  -75663.4386
## [30,] -108745.174  -854855.3   94740.414 -122816.262  155944.914  -53065.2033
## [31,]  -69652.174  -630193.3   80090.414  -90795.262  121946.914  -20558.2033
## [32,] -118325.497  -891043.6   92157.091 -140615.586  153170.591  -63676.5268
## [33,]  -71752.115  -634504.3   80423.473  -84691.203  124523.973  -25067.1445
## [34,]   79062.120   249363.0   26756.708   82173.032    7367.208   94554.0908
##               [,7]        [,8]        [,9]       [,10]       [,11]        [,12]
##  [1,]   -79245.292   38415.973  -149874.03  -128144.23  -159581.67   310075.650
##  [2,]  -639535.439  239694.826 -1061419.17  -909249.38  -933120.82  3061809.503
##  [3,]    73619.297  -18180.439   100283.56    86664.36    53089.91  -437663.762
##  [4,]   -94417.380   48225.885  -170934.12  -142881.32  -201333.76   356099.561
##  [5,]   116049.797  -31869.939   175277.06   151795.86   112690.41  -650323.262
##  [6,]   -38747.321   30121.944   -90395.06   -76600.26  -120372.70    71764.620
##  [7,]   236762.385  -76285.350   365300.65   316548.44   279876.00 -1222018.674
##  [8,]   -76285.350   34833.914  -132026.09  -111969.29  -133028.73   330622.591
##  [9,]   365300.650 -132026.086   610432.91   527067.71   531336.27 -1755680.409
## [10,]   316548.444 -111969.292   527067.71   456346.50   453880.06 -1529148.615
## [11,]   279876.003 -133028.733   531336.27   453880.06   608251.62 -1051191.056
## [12,] -1222018.674  330622.591 -1755680.41 -1529148.62 -1051191.06  6939850.267
## [13,] -1109897.733  284173.532 -1639858.47 -1437355.67 -1076473.12  6173575.208
## [14,]   234075.797  -93740.939   412375.06   355258.86   390589.41 -1051523.262
## [15,] -1267843.439  379234.826 -1943462.17 -1697331.38 -1451099.82  6629176.503
## [16,]    68158.885  -55123.850   198585.15   169946.94   316438.50    -4163.174
## [17,]   201241.297  -68270.439   321806.56   278090.36   244947.91 -1038772.762
## [18,]   180958.826  -59256.909   275935.09   238664.88   197564.44  -954039.233
## [19,]     1511.708   31255.973   -77946.03   -62606.23  -178219.67  -267031.350
## [20,]    84809.503   -3629.233    88776.77    81105.56   -16736.88  -623640.556
## [21,]    22850.150   37671.414   -47345.59   -32075.79  -212815.23  -483008.909
## [22,]   182424.856  -62376.880   299536.12   258895.91   262755.47  -883137.203
## [23,]   113385.267  -24199.468   152787.53   135364.33    63231.88  -691812.792
## [24,]   367585.708 -128464.027   605119.97   523451.77   510915.33 -1799429.350
## [25,]   182477.444  -57159.292   280752.71   242889.50   209162.06  -962903.615
## [26,]   135582.826  -31780.909   183352.09   160228.88    86273.44  -813951.233
## [27,]  -221273.880  102074.385  -444621.62  -382804.82  -500852.26   813041.061
## [28,]   174761.856  -54681.880   258364.12   222420.91   190362.47  -927876.203
## [29,]   325095.267 -114035.468   532113.53   460294.33   448470.88 -1590516.792
## [30,]   311399.503 -100083.233   494329.77   429036.56   385027.12 -1595976.556
## [31,]   239784.503  -71106.233   360746.77   313465.56   266713.12 -1271245.556
## [32,]   316101.179 -108541.556   510911.44   441838.24   427625.80 -1562001.880
## [33,]   242801.561  -71063.174   365770.83   318366.62   257854.18 -1303865.497
## [34,]   -23898.203   50548.061  -137398.94  -111455.14  -262230.59  -215093.262
##             [,13]       [,14]       [,15]       [,16]       [,17]      [,18]
##  [1,]   276567.59  -112041.88   399609.88  -84398.792   -75052.38  -61852.85
##  [2,]  2792909.44  -713197.03  3323188.74 -327131.939  -560477.53 -485546.00
##  [3,]  -391890.82    55690.71  -396950.53  -14118.203    60243.21   56271.74
##  [4,]   332548.50  -122964.97   456383.80  -90431.880   -79030.47  -67361.94
##  [5,]  -598919.32   106505.21  -628616.03   10887.297   100482.71   88489.24
##  [6,]    22466.56   -79704.91   166736.86  -85888.821   -44001.41  -35759.88
##  [7,] -1109897.73   234075.80 -1267843.44   68158.885   201241.30  180958.83
##  [8,]   284173.53   -93740.94   379234.83  -55123.850   -68270.44  -59256.91
##  [9,] -1639858.47   412375.06 -1943462.17  198585.150   321806.56  275935.09
## [10,] -1437355.67   355258.86 -1697331.38  169946.944   278090.36  238664.88
## [11,] -1076473.12   390589.41 -1451099.82  316438.503   244947.91  197564.44
## [12,]  6173575.21 -1051523.26  6629176.50   -4163.174 -1038772.76 -954039.23
## [13,]  5898469.15  -986866.32  6211483.44 -120965.233  -917441.82 -820799.29
## [14,]  -986866.32   290017.21 -1232570.03  174873.297   211918.71  177269.24
## [15,]  6211483.44 -1232570.03  6961188.74 -350778.939 -1063904.53 -952692.00
## [16,]  -120965.23   174873.30  -350778.94  240543.385    68857.80   40238.33
## [17,]  -917441.82   211918.71 -1063904.53   68857.797   181387.21  158898.74
## [18,]  -820799.29   177269.24  -952692.00   40238.326   158898.74  144371.27
## [19,]  -222892.41   -91251.88   -66621.12 -168179.792   -19962.38    1052.15
## [20,]  -578829.62    31426.91  -509439.32  -78088.997    64579.41   64425.94
## [21,]  -417148.97   -76601.44  -220476.67 -193821.350    10581.06   23690.59
## [22,]  -861359.26   197492.27  -985145.97   91762.356   153576.77  132173.30
## [23,]  -608914.85    86531.68  -634356.56  -22914.233    96933.18   90904.71
## [24,] -1676645.41   404503.12 -1965271.12  180263.208   322126.62  278243.15
## [25,]  -881545.67   177544.86  -979343.38   43765.944   155771.36  138697.88
## [26,]  -714954.29   103077.24  -740096.00  -26806.674   113646.74  106936.27
## [27,]   886169.00  -332229.47  1180218.30 -288294.380  -203760.97 -155194.44
## [28,]  -836130.26   158864.27  -925558.97   25737.356   143522.77  132158.30
## [29,] -1470925.85   355520.68 -1734250.56  156276.767   284036.18  247029.71
## [30,] -1480785.62   320862.91 -1681704.32  110453.003   269584.41  236373.94
## [31,] -1190631.62   223722.91 -1306463.32   49391.003   197440.41  178253.94
## [32,] -1456852.94   337178.59 -1691579.64  139398.679   271896.09  237654.62
## [33,] -1199517.56   227733.97 -1321204.26   45472.061   204857.47  184504.00
## [34,]  -180760.32  -140340.79    39538.97 -219943.703   -45752.29  -18257.76
##             [,19]       [,20]      [,21]      [,22]        [,23]       [,24]
##  [1,]   55092.032    6858.826   56222.47  -67868.82  -21997.4092  -144513.97
##  [2,]  136133.885 -144196.321  110259.33 -523328.97 -255214.5562 -1049489.12
##  [3,]   27882.620   44502.414   38686.06   53475.77   42781.1791   103649.62
##  [4,]   51381.944    7742.738   79178.38  -86670.91  -16892.4974  -163522.06
##  [5,]   14841.120   57200.914   38134.56   89667.27   62403.6791   178090.12
##  [6,]   70718.003   35106.797   77895.44  -31665.85    -389.4386   -83598.00
##  [7,]    1511.708   84809.503   22850.15  182424.86  113385.2673   367585.71
##  [8,]   31255.973   -3629.233   37671.41  -62376.88  -24199.4680  -128464.03
##  [9,]  -77946.027   88776.767  -47345.59  299536.12  152787.5320   605119.97
## [10,]  -62606.233   81105.561  -32075.79  258895.91  135364.3261   523451.77
## [11,] -178219.674  -16736.880 -212815.23  262755.47   63231.8849   510915.33
## [12,] -267031.350 -623640.556 -483008.91 -883137.20 -691812.7915 -1799429.35
## [13,] -222892.409 -578829.615 -417148.97 -861359.26 -608914.8503 -1676645.41
## [14,]  -91251.880   31426.914  -76601.44  197492.27   86531.6791   404503.12
## [15,]  -66621.115 -509439.321 -220476.67 -985145.97 -634356.5562 -1965271.12
## [16,] -168179.792  -78088.997 -193821.35   91762.36  -22914.2327   180263.21
## [17,]  -19962.380   64579.414   10581.06  153576.77   96933.1791   322126.62
## [18,]    1052.150   64425.944   23690.59  132173.30   90904.7085   278243.15
## [19,]  152508.032   90449.826  167869.47  -23763.82   44312.5908   -61153.97
## [20,]   90449.826   93918.620  126754.27   52969.97   72763.3849   100407.83
## [21,]  167869.473  126754.267  234540.91  -14774.38   77902.0320   -25513.53
## [22,]  -23763.821   52969.973  -14774.38  154122.33   75606.7379   297812.18
## [23,]   44312.591   72763.385   77902.03   75606.74   75293.1497   160096.59
## [24,]  -61153.968  100407.826  -25513.53  297812.18  160096.5908   602001.03
## [25,]    6902.767   71825.561   26982.21  141755.91   89312.3261   282875.77
## [26,]   50958.150   82865.944   80145.59   93604.30   84003.7085   190730.15
## [27,]  174139.444   17257.238  172371.88 -216141.41  -51613.9974  -427142.56
## [28,]   21469.179   71564.973   28722.62  133686.33   84358.7379   261165.18
## [29,]  -51511.409   87971.385  -22626.97  261242.74  141827.1497   529637.59
## [30,]  -15625.174  108861.620   23807.27  246006.97  148061.3849   496001.83
## [31,]   26327.826  102612.620   47627.27  187343.97  118992.3849   365221.83
## [32,]  -35679.497   93257.297  -11732.06  254946.65  138918.0614   509483.50
## [33,]   23995.885  105216.679   56487.33  185564.03  125125.4438   370939.88
## [34,]  193642.120  109327.914  219560.56  -50188.73   47408.6791  -115578.88
##             [,25]      [,26]      [,27]       [,28]       [,29]       [,30]
##  [1,]  -57835.233  -26269.85  134767.44  -50502.821  -127679.41  -108745.17
##  [2,] -493213.380 -321459.00  755272.30 -467003.968  -924257.56  -854855.32
##  [3,]   59780.356   53011.74  -36218.97   60129.767    91330.18    94740.41
##  [4,]  -71156.321  -30673.94  148945.36  -72267.909  -144670.50  -122816.26
##  [5,]   93487.856   75456.24  -94519.47   88356.267   155748.68   155944.91
##  [6,]  -22618.262    2243.12  102793.41  -16041.850   -75663.44   -53065.20
##  [7,]  182477.444  135582.83 -221273.88  174761.856   325095.27   311399.50
##  [8,]  -57159.292  -31780.91  102074.38  -54681.880  -114035.47  -100083.23
##  [9,]  280752.708  183352.09 -444621.62  258364.120   532113.53   494329.77
## [10,]  242889.503  160228.88 -382804.82  222420.914   460294.33   429036.56
## [11,]  209162.061   86273.44 -500852.26  190362.473   448470.88   385027.12
## [12,] -962903.615 -813951.23  813041.06 -927876.203 -1590516.79 -1595976.56
## [13,] -881545.674 -714954.29  886169.00 -836130.262 -1470925.85 -1480785.62
## [14,]  177544.856  103077.24 -332229.47  158864.267   355520.68   320862.91
## [15,] -979343.380 -740096.00 1180218.30 -925558.968 -1734250.56 -1681704.32
## [16,]   43765.944  -26806.67 -288294.38   25737.356   156276.77   110453.00
## [17,]  155771.356  113646.74 -203760.97  143522.767   284036.18   269584.41
## [18,]  138697.885  106936.27 -155194.44  132158.297   247029.71   236373.94
## [19,]    6902.767   50958.15  174139.44   21469.179   -51511.41   -15625.17
## [20,]   71825.561   82865.94   17257.24   71564.973    87971.38   108861.62
## [21,]   26982.208   80145.59  172371.88   28722.620   -22626.97    23807.27
## [22,]  141755.914   93604.30 -216141.41  133686.326   261242.74   246006.97
## [23,]   89312.326   84003.71  -51614.00   84358.738   141827.15   148061.38
## [24,]  282875.767  190730.15 -427142.56  261165.179   529637.59   496001.83
## [25,]  143039.503  107962.88 -166193.82  136650.914   249187.33   241543.56
## [26,]  107962.885   98734.27  -63111.44  105809.297   168817.71   175033.94
## [27,] -166193.821  -63111.44  447785.86 -138263.409  -371602.00  -320045.76
## [28,]  136650.914  105809.30 -138263.41  136718.326   231278.74   225140.97
## [29,]  249187.326  168817.71 -371602.00  231278.738   466730.15   436506.38
## [30,]  241543.561  175033.94 -320045.76  225140.973   436506.38   417626.62
## [31,]  187559.561  143844.94 -207574.76  181897.973   322076.38   315090.62
## [32,]  243632.238  167458.62 -349121.09  228932.650   448809.06   422643.30
## [33,]  189519.620  148147.00 -206489.70  180946.032   327199.44   320627.68
## [34,]  -11111.144   51178.24  242234.53    5307.267   -99460.32   -51002.09
##              [,31]       [,32]        [,33]       [,34]
##  [1,]   -69652.174  -118325.50   -71752.115   79062.120
##  [2,]  -630193.321  -891043.64  -634504.262  249362.973
##  [3,]    80090.414    92157.09    80423.473   26756.708
##  [4,]   -90795.262  -140615.59   -84691.203   82173.032
##  [5,]   121946.914   153170.59   124523.973    7367.208
##  [6,]   -20558.203   -63676.53   -25067.144   94554.091
##  [7,]   239784.503   316101.18   242801.561  -23898.203
##  [8,]   -71106.233  -108541.56   -71063.174   50548.061
##  [9,]   360746.767   510911.44   365770.826 -137398.939
## [10,]   313465.561   441838.24   318366.620 -111455.144
## [11,]   266713.120   427625.80   257854.179 -262230.586
## [12,] -1271245.556 -1562001.88 -1303865.497 -215093.262
## [13,] -1190631.615 -1456852.94 -1199517.556 -180760.321
## [14,]   223722.914   337178.59   227733.973 -140340.792
## [15,] -1306463.321 -1691579.64 -1321204.262   39538.973
## [16,]    49391.003   139398.68    45472.061 -219943.703
## [17,]   197440.414   271896.09   204857.473  -45752.292
## [18,]   178253.944   237654.62   184504.003  -18257.762
## [19,]    26327.826   -35679.50    23995.885  193642.120
## [20,]   102612.620    93257.30   105216.679  109327.914
## [21,]    47627.267   -11732.06    56487.326  219560.561
## [22,]   187343.973   254946.65   185564.032  -50188.733
## [23,]   118992.385   138918.06   125125.444   47408.679
## [24,]   365221.826   509483.50   370939.885 -115578.880
## [25,]   187559.561   243632.24   189519.620  -11111.144
## [26,]   143844.944   167458.62   148147.003   51178.238
## [27,]  -207574.762  -349121.09  -206489.703  242234.532
## [28,]   181897.973   228932.65   180946.032    5307.267
## [29,]   322076.385   448809.06   327199.444  -99460.321
## [30,]   315090.620   422643.30   320627.679  -51002.086
## [31,]   251679.620   317831.30   251270.679    7287.914
## [32,]   317831.297   434486.97   320263.356  -79425.409
## [33,]   251270.679   320263.36   254815.738    5727.973
## [34,]     7287.914   -79425.41     5727.973  250859.208
eigen_decomp <- eigen(B)
values <- eigen_decomp$values
vectors <- eigen_decomp$vectors
values
##  [1]  2.593329e+07  2.496920e+06  3.433420e+05  1.164946e+05  9.142386e+04
##  [6]  1.050316e+04  1.526936e-09  1.253976e-09  9.334625e-10  7.057659e-10
## [11]  6.746188e-10  5.278365e-10  1.609695e-10  1.244778e-10  1.037466e-10
## [16]  1.935234e-11 -8.800055e-11 -1.062780e-10 -1.363508e-10 -1.646751e-10
## [21] -1.728773e-10 -1.908670e-10 -2.237440e-10 -2.445036e-10 -2.550743e-10
## [26] -3.077544e-10 -3.753473e-10 -4.919893e-10 -5.207728e-10 -6.251737e-10
## [31] -6.504843e-10 -6.592162e-10 -8.339437e-10 -9.270070e-10
vectors
##               [,1]         [,2]          [,3]         [,4]         [,5]
##  [1,] -0.029001990 -0.097207596  0.0628064825 -0.099668539 -0.014121155
##  [2,] -0.249606787 -0.299167050  0.3159157898  0.438548329  0.003080997
##  [3,]  0.030777060 -0.036672471 -0.0345681474 -0.124940875 -0.013415713
##  [4,] -0.033858105 -0.113259566  0.0669477209  0.265975053  0.274184254
##  [5,]  0.048325010 -0.018036064 -0.0226623623 -0.123033665  0.154678396
##  [6,] -0.010843738 -0.115721509  0.1372673681 -0.299645194  0.037356298
##  [7,]  0.094596489  0.027402873 -0.0669991493  0.020399129 -0.112358444
##  [8,] -0.028185268 -0.063760406  0.0884834530  0.022673476  0.096615382
##  [9,]  0.144396905  0.164782342 -0.0423838010  0.016427551  0.117428349
## [10,]  0.125673902  0.134019682  0.0007361369  0.084317101  0.108720957
## [11,]  0.104629195  0.350442915  0.1099222998 -0.177661202 -0.263190260
## [12,] -0.502938666  0.332943203  0.5413808772 -0.038292621 -0.121821280
## [13,] -0.465838349  0.239869480 -0.5568329311  0.346508825 -0.268264994
## [14,]  0.090799496  0.170815335 -0.0364794892  0.099116953  0.123160344
## [15,] -0.515330501 -0.051199764 -0.2484710380 -0.496490449  0.432573539
## [16,]  0.021642007  0.290784490  0.2028379543  0.157837134  0.050879062
## [17,]  0.080195520  0.042695115 -0.1375620717  0.089815354  0.161215434
## [18,]  0.071629432  0.013051856 -0.1642557498  0.115439690 -0.025065032
## [19,]  0.006358853 -0.236653739  0.0463769693 -0.088014593 -0.330339296
## [20,]  0.039513559 -0.143393479  0.0622979799 -0.045693185  0.074806838
## [21,]  0.018991001 -0.293204584  0.0628131485  0.153928347  0.262402016
## [22,]  0.073101646  0.066908844  0.0712739170 -0.142121154 -0.037823044
## [23,]  0.047951572 -0.069153327 -0.0395036413  0.151233035  0.075494155
## [24,]  0.146080654  0.136881070 -0.0357171617  0.047814143  0.109082678
## [25,]  0.073826773  0.009345708 -0.0423208223 -0.082227910 -0.002300992
## [26,]  0.056668507 -0.073203783 -0.0756718309 -0.014542579  0.019122847
## [27,] -0.084781365 -0.308789104 -0.2120917221 -0.020584352 -0.292137218
## [28,]  0.069966740 -0.005377223 -0.0764519699 -0.181886065 -0.202607796
## [29,]  0.128714184  0.118825179 -0.0542386824  0.077193464  0.028390344
## [30,]  0.125551677  0.055458786 -0.0191530138  0.033805205  0.095905765
## [31,]  0.097671301 -0.006440417  0.0308560025 -0.118154431 -0.156075988
## [32,]  0.125759620  0.097808161 -0.0203938271 -0.030397500 -0.046167316
## [33,]  0.099010718 -0.011958633 -0.0168734057 -0.005343188 -0.027384566
## [34,] -0.001447051 -0.308836321  0.1027147174 -0.032335289 -0.312024561
##               [,6]         [,7]         [,8]         [,9]       [,10]
##  [1,] -0.098604987  0.000000000  0.000000000  0.000000000  0.73601735
##  [2,]  0.518409826  0.032089999 -0.101580690 -0.016389586  0.11463138
##  [3,]  0.010726977  0.126418970 -0.608002977  0.194975915 -0.21552126
##  [4,] -0.128298252  0.043656142  0.250032511  0.033632405  0.02488252
##  [5,] -0.101715951  0.128112997 -0.049905165 -0.011008966 -0.11105806
##  [6,] -0.028400650  0.482205683  0.002483104  0.014036185  0.05497054
##  [7,] -0.087030782 -0.280694289  0.145323850 -0.377487490 -0.01730996
##  [8,] -0.213752264  0.165656473  0.076043773 -0.230566067 -0.15357064
##  [9,]  0.017799531  0.051755846 -0.364308294 -0.478996317  0.12461465
## [10,] -0.009597772 -0.444925834 -0.196600832  0.070180727  0.07962442
## [11,]  0.581142167  0.114719974 -0.020365593 -0.151666311 -0.05240049
## [12,] -0.330616076 -0.095759969 -0.269090027  0.001401874  0.06515581
## [13,] -0.104402327  0.246309819 -0.043638025  0.098851928 -0.04486862
## [14,]  0.186662477 -0.004315357 -0.085862063  0.304992919  0.10385017
## [15,]  0.245607589 -0.218653601  0.022293491 -0.126149254 -0.07695147
## [16,]  0.017471719  0.122339540  0.074680891 -0.231929232 -0.16578514
## [17,]  0.150289156  0.082912969 -0.109017616  0.016363368  0.22325761
## [18,] -0.037498086  0.065513792 -0.126353472 -0.151025507  0.13547275
## [19,]  0.013835671 -0.087105442  0.052595274  0.059693039 -0.09589414
## [20,]  0.003969032  0.132367726 -0.094121468  0.003414284 -0.10340484
## [21,] -0.107117045  0.109678202 -0.283930415 -0.056142287 -0.13363097
## [22,] -0.112324296  0.110292830  0.058055928  0.196953914  0.01227428
## [23,]  0.011400296 -0.035440359 -0.100667975 -0.114132593 -0.24820300
## [24,] -0.044132915 -0.232222582 -0.081163308  0.280932271 -0.09559208
## [25,]  0.082614094  0.082615845 -0.067659018  0.162971798  0.07334836
## [26,] -0.068696788  0.036546001 -0.142639103  0.061489268  0.14485815
## [27,] -0.009834239 -0.057486471 -0.219934392 -0.202479876  0.08992258
## [28,] -0.087291597  0.028641524 -0.047108884 -0.141696574  0.11614750
## [29,] -0.069976415 -0.116020263 -0.069503725 -0.132192419 -0.05000722
## [30,] -0.072095464  0.189930445 -0.041234055 -0.181421814  0.05376099
## [31,] -0.005909755 -0.062049294 -0.046652890  0.097194511 -0.15782235
## [32,] -0.026701674  0.237877942  0.070538279  0.107142508  0.01403375
## [33,] -0.076681649 -0.147660359 -0.195830897  0.104476878  0.08231215
## [34,] -0.019249549 -0.140612682 -0.028654943 -0.023531537 -0.14737458
##              [,11]         [,12]         [,13]        [,14]       [,15]
##  [1,]  0.000000000  0.0000000000  0.0000000000  0.000000000  0.00000000
##  [2,] -0.085166388  0.0233951652  0.0803469226  0.020032720 -0.06579868
##  [3,] -0.091470770 -0.0626912265 -0.0404716628 -0.087131904  0.04586359
##  [4,]  0.295386267 -0.1887403847  0.1090399217  0.078636509  0.05493143
##  [5,] -0.320424404  0.0954683782  0.0514307970 -0.055664749 -0.06141728
##  [6,] -0.067965448 -0.5671409888 -0.1533100278 -0.060550323  0.04894095
##  [7,] -0.062986932 -0.1488503919 -0.1209736197  0.025340016  0.08919321
##  [8,]  0.305959463 -0.1656264424 -0.3113180829 -0.030357529 -0.06765720
##  [9,] -0.031206391 -0.0665361077  0.0909082807  0.011370215 -0.05440884
## [10,] -0.005344126 -0.4128415710 -0.0679842615 -0.003343218 -0.16629876
## [11,]  0.237604587 -0.1215052465  0.0513473866  0.061892530  0.15102818
## [12,]  0.022894912  0.1157725514 -0.0326291606  0.055905893 -0.01566915
## [13,]  0.104761575 -0.1540854325 -0.0152649274  0.054763464 -0.04650044
## [14,]  0.238260828 -0.0194544416  0.0032241761 -0.203849819 -0.06939201
## [15,]  0.120183411  0.1016137192  0.0200563819  0.024518065  0.00620927
## [16,] -0.002008415  0.0242880932  0.0104294921 -0.035543428  0.11933112
## [17,] -0.044399784  0.0510795322 -0.3444202878  0.233438228 -0.21784960
## [18,] -0.075151305  0.0534254839 -0.0695074780  0.268009863  0.14237836
## [19,]  0.079086573 -0.0248787527 -0.0995001547  0.012374799  0.16812420
## [20,]  0.232722574  0.1146401775 -0.0002803059  0.580332297  0.24954546
## [21,]  0.036767803 -0.0402536635  0.1919757885  0.059256708 -0.01211154
## [22,]  0.107186574  0.0011083087  0.2186491951  0.252875872 -0.13240395
## [23,]  0.083262525  0.0939655651 -0.0085911459 -0.347604081 -0.08172804
## [24,]  0.046100576 -0.1865722399  0.3397394241  0.252830083  0.14136022
## [25,]  0.174338442  0.1604333198 -0.2943474960  0.057244609 -0.29628578
## [26,]  0.278896818  0.2159091099 -0.0930967387 -0.203607120  0.44405989
## [27,] -0.099833756 -0.0718521997  0.1507955913  0.053976544  0.06032584
## [28,]  0.261104214  0.0011023622  0.4761483932 -0.074195234 -0.21454770
## [29,]  0.003448137  0.2139633901 -0.2190272385  0.242454349  0.05602015
## [30,]  0.292826804  0.2104928161  0.1651346180 -0.080613824 -0.31501183
## [31,] -0.054265660  0.0113609572 -0.1447697706  0.167817814 -0.34337400
## [32,] -0.246678246  0.3191348235  0.0865882886 -0.091061862  0.10772359
## [33,]  0.261620923  0.0008748017 -0.1887409410 -0.229647982  0.26099304
## [34,]  0.240482066  0.0860858764 -0.0858544578  0.029694327 -0.24427812
##             [,16]        [,17]         [,18]        [,19]        [,20]
##  [1,]  0.00000000  0.000000000  0.0000000000  0.000000000  0.000000000
##  [2,] -0.04403487  0.082724599 -0.0333704417 -0.060271923  0.061426566
##  [3,]  0.02623884  0.255880432  0.0505548479 -0.041988439  0.066878073
##  [4,] -0.02834791  0.110230383 -0.1312790638  0.038451790 -0.092337903
##  [5,]  0.05574049  0.101224821 -0.0129759670 -0.040130859 -0.276055192
##  [6,] -0.04257826  0.094707542 -0.1411110354 -0.039643271 -0.044254067
##  [7,] -0.09057878  0.058734118 -0.1040147590  0.066102923  0.133580439
##  [8,]  0.02649476  0.047451422  0.0587118305  0.178330523  0.194361208
##  [9,]  0.09520011 -0.139591444 -0.0747261987  0.180142030 -0.028514656
## [10,]  0.06840047  0.007692870 -0.1558086355 -0.080796110 -0.189065817
## [11,] -0.11451248 -0.061653799 -0.0083043214  0.114267610  0.064726882
## [12,] -0.03606755 -0.020243087 -0.1027278317  0.050970625  0.057308211
## [13,] -0.03963518 -0.033443921  0.0093688932  0.007872011 -0.073332657
## [14,]  0.26489368  0.198115815 -0.2751208853  0.016729867 -0.155104390
## [15,] -0.01147930  0.082851889  0.0149295283 -0.069341009 -0.013553623
## [16,]  0.04638147  0.113892636  0.3594238589 -0.208606729 -0.283738804
## [17,] -0.50829929  0.088358024  0.2293140014  0.057003809 -0.168195684
## [18,]  0.19573977  0.232585871 -0.1485726393 -0.557010319  0.339336461
## [19,]  0.14717296  0.143192785  0.1683115407 -0.082140422  0.078476813
## [20,]  0.17162319 -0.239052299 -0.2771556580 -0.080586834 -0.312408145
## [21,] -0.11614997 -0.035354089  0.2633047339  0.085218168  0.153733912
## [22,] -0.24577892  0.040423837 -0.1418360393  0.092819272 -0.018796967
## [23,] -0.20916577 -0.101735154 -0.4749325060 -0.017659234  0.086592956
## [24,] -0.06104498 -0.020465219  0.2052041226  0.185593385  0.260014699
## [25,]  0.39432720 -0.064016274  0.1151726107  0.258852031  0.288773830
## [26,] -0.35966126 -0.009672119 -0.1080677638  0.008325749  0.175541829
## [27,]  0.10049297 -0.196077453 -0.0371812336  0.298150149 -0.186808622
## [28,] -0.13227639  0.358759607  0.0473239558 -0.176054574 -0.018242930
## [29,] -0.02724297  0.463218376 -0.1054599007  0.225122335 -0.083038919
## [30,]  0.14355725 -0.194862159  0.1091144321 -0.160861546  0.008079303
## [31,] -0.27290084 -0.332368524 -0.1134269795 -0.353882397  0.091843685
## [32,] -0.03022161  0.036728041 -0.1543288088  0.197418300 -0.094457675
## [33,] -0.01486881 -0.226980569  0.2718155395 -0.201827092 -0.317516343
## [34,] -0.04456938  0.257332884 -0.0006988779  0.068013769 -0.272806467
##             [,21]         [,22]        [,23]        [,24]        [,25]
##  [1,]  0.00000000  0.0000000000  0.000000000  0.000000000  0.000000000
##  [2,]  0.16929816  0.0365795229  0.075791473  0.107300343 -0.022391071
##  [3,]  0.12576922  0.0113549102  0.018302162 -0.437817892 -0.076679305
##  [4,]  0.18016863  0.0612590259 -0.368174306 -0.389102868  0.112047768
##  [5,]  0.07653175 -0.0776431725 -0.135466750  0.407444862 -0.027351354
##  [6,]  0.02435475 -0.0912399645 -0.158405758  0.187233643 -0.051665170
##  [7,]  0.12710171 -0.3364721465  0.171152105 -0.025854483 -0.156537166
##  [8,] -0.02417595  0.3477239483  0.363174354  0.135997048 -0.078441483
##  [9,] -0.21475582  0.0074058897 -0.255908155 -0.245800317  0.052099900
## [10,]  0.15020917  0.0941838671  0.012756469  0.241238847 -0.054468153
## [11,]  0.16487760 -0.1129604495 -0.021886300  0.071549246 -0.023755560
## [12,]  0.01557947  0.0004866872 -0.090555114  0.080637422 -0.014535331
## [13,]  0.03766797 -0.1382521831 -0.039086214  0.081393592 -0.019943970
## [14,] -0.31381425  0.0923796879  0.290507888 -0.010249354 -0.208935933
## [15,]  0.05885774  0.0868090468 -0.012818443  0.015434045 -0.058469847
## [16,] -0.22401596  0.2628665804  0.039130255  0.052475838  0.119786404
## [17,] -0.07895679  0.1589586983 -0.131518118  0.051495214  0.003769359
## [18,]  0.02324184  0.0553817397  0.003322629  0.141960236 -0.017164978
## [19,]  0.12308635  0.3619254321 -0.330732691  0.017492321 -0.091435567
## [20,] -0.10434270 -0.0956544933  0.053601596  0.080454534  0.106834015
## [21,]  0.01256548 -0.2866161295  0.246189086  0.135592385  0.024554989
## [22,]  0.29077722  0.1508013809  0.274389926 -0.080559925 -0.013285711
## [23,]  0.09148142  0.1448409168 -0.208506761  0.222301535  0.290450446
## [24,] -0.11433363  0.1066413644 -0.251315531  0.299452022 -0.125941077
## [25,]  0.04797871 -0.0955572695 -0.130368050  0.151506779  0.395791590
## [26,] -0.25075168  0.0078313239 -0.067871412  0.124941845 -0.155020741
## [27,]  0.01768661  0.4170947759  0.125057950  0.054444681 -0.031152457
## [28,] -0.04236678  0.0168721027  0.091382869  0.098703501  0.398739333
## [29,]  0.28044771  0.0109660631  0.010978897  0.007402113  0.008672042
## [30,]  0.30843592  0.0164216932 -0.166859909  0.064671270 -0.564691249
## [31,] -0.10882333  0.1358545542  0.038852611 -0.143951171 -0.013726752
## [32,]  0.18772471  0.0974117845  0.006435964  0.089872921 -0.095562251
## [33,]  0.38426483 -0.1142725854  0.095251616  0.042135534  0.196760945
## [34,] -0.27466245 -0.2996310666 -0.188438476  0.074706396 -0.223597700
##               [,26]       [,27]        [,28]         [,29]        [,30]
##  [1,]  0.0000000000  0.00000000  0.000000000  0.0000000000  0.000000000
##  [2,] -0.0933168728  0.09698469 -0.207102211  0.1431773058  0.087034815
##  [3,] -0.0004775527  0.27726690 -0.231477708 -0.0348039568 -0.032631486
##  [4,] -0.1488145786 -0.10463820 -0.087373732 -0.2888477831 -0.086388137
##  [5,]  0.0234569739 -0.04042486 -0.133530767  0.0525550295  0.261635701
##  [6,] -0.0168774354 -0.13795850 -0.074467647 -0.0337650709 -0.044556665
##  [7,]  0.0338809313  0.10523848 -0.334572798  0.1139323170 -0.400128163
##  [8,] -0.2257849142  0.29344582  0.111647846  0.0210442552  0.162521657
##  [9,]  0.0270737452 -0.03407468  0.193222473  0.2395042769  0.032326811
## [10,] -0.0445372386 -0.01856765 -0.102659433  0.0550207295 -0.135534846
## [11,] -0.0434804363 -0.08475536  0.141378788 -0.1899756317  0.058193083
## [12,] -0.0377805605 -0.02744337  0.063207422 -0.0555513879 -0.091924374
## [13,] -0.0218316434 -0.05244342 -0.023447416  0.1338779297 -0.015775767
## [14,] -0.0156363318 -0.20669133  0.112653986  0.0592096527 -0.147867455
## [15,] -0.0248269735 -0.04000226  0.003502137 -0.0502509437 -0.137097039
## [16,]  0.2052357606 -0.12295116 -0.316023369 -0.1402555897 -0.235821887
## [17,]  0.0467251402  0.19030940  0.118341111  0.0346305457 -0.192663991
## [18,]  0.1202228771  0.05355515  0.226774840 -0.3487863374 -0.055509559
## [19,]  0.0603234926 -0.20300488  0.186516824  0.4937964156 -0.242308928
## [20,] -0.0832614491  0.19799389 -0.104187775  0.2397031196 -0.080166879
## [21,] -0.0137972304 -0.43491568  0.250871640 -0.0003351395 -0.277478361
## [22,]  0.5897226905 -0.02711922  0.008781913  0.0614608043 -0.036484534
## [23,]  0.2213175727  0.09132579  0.117326786 -0.0142472082 -0.085496429
## [24,] -0.1134289791  0.17977540 -0.038769443 -0.0974323855  0.054429473
## [25,]  0.0971246308 -0.07220104 -0.308645005 -0.0947283686 -0.180608435
## [26,]  0.0477431812 -0.15632828 -0.368107556  0.0385857517  0.078424479
## [27,]  0.0409884452 -0.14143280 -0.146955340 -0.3833414139 -0.006123818
## [28,] -0.2867935965  0.09366380 -0.111967167  0.1595260331 -0.016123894
## [29,] -0.1534011291 -0.38886988 -0.036178680  0.0367835837  0.325917761
## [30,]  0.0190349271  0.02011845 -0.153449661  0.0336761022  0.021400905
## [31,] -0.3495627870 -0.34595050 -0.143038997 -0.0622339343  0.012541488
## [32,] -0.4167182163  0.11679482  0.115985498 -0.1145363449 -0.504984059
## [33,] -0.0664802386  0.06096201  0.169393750 -0.0931890601  0.050359501
## [34,]  0.0993285663  0.12707445  0.146335748 -0.2927396048 -0.042211407
##              [,31]       [,32]        [,33]         [,34]
##  [1,]  0.651296562  0.00000000  0.000000000  0.0000000000
##  [2,] -0.070109185  0.15764093  0.093059479  0.2258279763
##  [3,]  0.225000201 -0.05740939 -0.073432752 -0.0775466497
##  [4,] -0.025764094  0.02612722 -0.311300738  0.0568334042
##  [5,]  0.096276012  0.05232596 -0.590914052  0.2323897560
##  [6,] -0.142457661 -0.09220735  0.333428012  0.1007904479
##  [7,]  0.021834167 -0.19384804 -0.127244418  0.3051650186
##  [8,]  0.127445792  0.16599446 -0.145728973  0.0536496859
##  [9,] -0.097958479  0.32727358  0.044351960  0.2832015102
## [10,] -0.050646707  0.33296669 -0.031334215 -0.4287961063
## [11,]  0.160669878 -0.01847368 -0.283044293 -0.1436456540
## [12,] -0.157097209 -0.16600151 -0.098999596  0.0159159076
## [13,]  0.150863570  0.12052991  0.007837372  0.0373265337
## [14,] -0.038204723 -0.25680494 -0.110876783  0.2852080440
## [15,]  0.050917955  0.10383261  0.087017758  0.0929988569
## [16,]  0.240056528  0.07853062  0.159148288  0.0153738192
## [17,] -0.189096635 -0.27760088 -0.123674280 -0.0393176129
## [18,] -0.120672486  0.07211858 -0.067131708  0.0615985620
## [19,]  0.050321263 -0.01491584 -0.151743250  0.0296537932
## [20,]  0.086436246 -0.11127830  0.022780834 -0.1153217146
## [21,]  0.115068409 -0.01906276 -0.091663585 -0.1428723067
## [22,] -0.047077253  0.28257045  0.001702725  0.1986630133
## [23,]  0.302618868 -0.22526714  0.135251363  0.0013892147
## [24,]  0.141406281 -0.08455361  0.179608872  0.3125458536
## [25,] -0.074251755  0.09229777 -0.035886404  0.0615998712
## [26,] -0.177017887  0.24949327 -0.086673289 -0.1099772525
## [27,] -0.142002826 -0.20189467 -0.050841660  0.0089614469
## [28,] -0.167013296 -0.08398920 -0.014602063 -0.0327534765
## [29,]  0.087043362 -0.09702597  0.311602500  0.0003707925
## [30,] -0.048701592 -0.17747829  0.119373514 -0.1089284991
## [31,]  0.156404402  0.08999960 -0.020338660  0.2389375219
## [32,] -0.003389807  0.30219098  0.102335167  0.0216692787
## [33,] -0.101788985  0.02712896  0.097247062  0.3664431142
## [34,]  0.095853159  0.24265272  0.086870966  0.0719542285
pos_idx <- which(values > 0)
k <- 2 
lambda <- diag( sqrt(values[pos_idx][1:k]) )
vec <- vectors[, pos_idx][, 1:k]
lambda
##          [,1]     [,2]
## [1,] 5092.474    0.000
## [2,]    0.000 1580.164
vec
##               [,1]         [,2]
##  [1,] -0.029001990 -0.097207596
##  [2,] -0.249606787 -0.299167050
##  [3,]  0.030777060 -0.036672471
##  [4,] -0.033858105 -0.113259566
##  [5,]  0.048325010 -0.018036064
##  [6,] -0.010843738 -0.115721509
##  [7,]  0.094596489  0.027402873
##  [8,] -0.028185268 -0.063760406
##  [9,]  0.144396905  0.164782342
## [10,]  0.125673902  0.134019682
## [11,]  0.104629195  0.350442915
## [12,] -0.502938666  0.332943203
## [13,] -0.465838349  0.239869480
## [14,]  0.090799496  0.170815335
## [15,] -0.515330501 -0.051199764
## [16,]  0.021642007  0.290784490
## [17,]  0.080195520  0.042695115
## [18,]  0.071629432  0.013051856
## [19,]  0.006358853 -0.236653739
## [20,]  0.039513559 -0.143393479
## [21,]  0.018991001 -0.293204584
## [22,]  0.073101646  0.066908844
## [23,]  0.047951572 -0.069153327
## [24,]  0.146080654  0.136881070
## [25,]  0.073826773  0.009345708
## [26,]  0.056668507 -0.073203783
## [27,] -0.084781365 -0.308789104
## [28,]  0.069966740 -0.005377223
## [29,]  0.128714184  0.118825179
## [30,]  0.125551677  0.055458786
## [31,]  0.097671301 -0.006440417
## [32,]  0.125759620  0.097808161
## [33,]  0.099010718 -0.011958633
## [34,] -0.001447051 -0.308836321
# membentuk koordinat MDS
X <- vec %*% lambda
colnames(X) <- c("Dim1", "Dim2")
mds_coords <- as.data.frame(X)
mds_coords$Label <- labels
mds_coords
##            Dim1        Dim2 Label
## 1   -147.691888 -153.603986     1
## 2  -1271.116154 -472.733132     2
## 3    156.731386  -57.948535     3
## 4   -172.421530 -178.968738     4
## 5    246.093875  -28.499947     5
## 6    -55.221456 -182.859013     6
## 7    481.730191   43.301045     7
## 8   -143.532755 -100.751927     8
## 9    735.337530  260.383196     9
## 10   639.991119  211.773134    10
## 11   532.821487  553.757430    11
## 12 -2561.202239  526.105007    12
## 13 -2372.269827  379.033220    13
## 14   462.394100  269.916316    14
## 15 -2624.307343  -80.904046    15
## 16   110.211366  459.487309    16
## 17   408.393627   67.465302    17
## 18   364.771043   20.624079    18
## 19    32.382296 -373.951821    19
## 20   201.221782 -226.585275    20
## 21    96.711185 -463.311456    21
## 22   372.268254  105.726975    22
## 23   244.192147 -109.273627    23
## 24   743.911978  216.294598    24
## 25   375.960947   14.767755    25
## 26   288.582916 -115.674015    26
## 27  -431.746925 -487.937559    27
## 28   356.303826   -8.496896    28
## 29   655.473675  187.763321    29
## 30   639.368689   87.634002    30
## 31   497.388592  -10.176917    31
## 32   640.427637  154.552977    32
## 33   504.209537  -18.896606    33
## 34    -7.369069 -488.012171    34
# menghitung jarak euclidean dari koordinat
D_hat <- dist(mds_coords[,1:2])
as.matrix(D_hat)
##             1         2          3          4          5          6          7
## 1     0.00000 1167.8722  319.09794   35.42493  413.18065   96.98782  659.50265
## 2  1167.87221    0.0000 1486.87419 1137.28950 1580.90777 1249.97077 1827.22784
## 3   319.09794 1486.8742    0.00000  350.69578   94.08971  246.02161  340.40520
## 4    35.42493 1137.2895  350.69578    0.00000  444.74262  117.26462  690.88228
## 5   413.18065 1580.9078   94.08971  444.74262    0.00000  338.55229  246.33282
## 6    96.98782 1249.9708  246.02161  117.26462  338.55229    0.00000  582.63663
## 7   659.50265 1827.2278  340.40520  690.88228  246.33282  582.63663    0.00000
## 8    53.01546 1187.3560  303.29966   83.38124  396.26918  120.58383  641.64243
## 9   975.25706 2136.1919  660.39394 1008.49226  568.16620  906.33723  333.82831
## 10  868.30004 2029.9950  553.43450  901.49516  461.39592  799.40919  231.14793
## 11  981.55928 2075.5418  718.07239 1016.98346  649.02726  942.54883  513.00686
## 12 2507.39637 1631.5636 2779.97873 2490.66302 2861.55519 2604.33670 3080.99618
## 13 2287.45479 1392.1370 2566.47622 2269.51508 2649.88901 2384.20554 2873.67921
## 14  742.68052 1885.8913  448.24665  777.48870  368.56214  687.70005  227.43871
## 15 2477.68226 1408.7783 2781.13347 2453.84611 2870.87954 2571.10815 3108.51992
## 16  665.12783 1666.4635  519.52282  698.21736  506.55268  663.30748  557.88641
## 17  598.41685 1764.2470  281.18057  630.93263  188.54850  526.87874   77.21504
## 18  541.27043 1708.6627  222.38290  573.07343  128.44236  466.68948  119.13726
## 19  284.56964 1307.2360  339.58912  282.77732  406.21378  210.21627  613.19938
## 20  356.46461 1492.7718  174.40684  376.66518  203.10416  260.14442  389.26032
## 21  394.52703 1367.8598  409.78229  391.51398  459.75671  318.96254  636.31428
## 22  581.04311 1742.2194  270.63964  614.60443  184.21955  515.78031  126.01156
## 23  394.38341 1558.2882  101.40833  422.40308   80.79606  308.32339  282.31782
## 24  965.28877 2129.5769  648.06662  997.94800  554.74970  893.27367  314.11154
## 25  550.05576 1717.7078  230.97459  581.59880  136.88517  474.31488  109.55036
## 26  437.92053 1600.0476  143.93421  465.32926   96.97751  350.30739  250.15783
## 27  438.70970  839.5069  728.83282  403.37500  818.87183  484.60742 1056.71893
## 28  524.46901 1692.3389  205.60794  555.52781  112.01051  446.93982  135.70114
## 29  872.70073 2036.6649  555.98398  905.48488  462.99203  801.52884  225.95607
## 30  823.20114 1990.9705  504.11610  854.44741  410.06362  745.40052  163.75380
## 31  660.83292 1827.9954  343.99049  690.75052  251.96184  578.96198   55.72323
## 32  846.22284 2011.8369  528.31710  878.61283  434.74992  773.15879  193.80885
## 33  665.67375 1832.4161  349.66572  695.30762  258.29425  582.96373   66.13523
## 34  362.65594 1263.8394  460.30826  350.35719  524.78086  308.88234  722.15775
##             8          9         10        11        12        13        14
## 1    53.01546  975.25706  868.30004  981.5593 2507.3964 2287.4548  742.6805
## 2  1187.35603 2136.19192 2029.99503 2075.5418 1631.5636 1392.1370 1885.8913
## 3   303.29966  660.39394  553.43450  718.0724 2779.9787 2566.4762  448.2466
## 4    83.38124 1008.49226  901.49516 1016.9835 2490.6630 2269.5151  777.4887
## 5   396.26918  568.16620  461.39592  649.0273 2861.5552 2649.8890  368.5621
## 6   120.58383  906.33723  799.40919  942.5488 2604.3367 2384.2055  687.7001
## 7   641.64243  333.82831  231.14793  513.0069 3080.9962 2873.6792  227.4387
## 8     0.00000  950.17449  843.55295  941.1894 2497.6139 2279.7944  710.3114
## 9   950.17449    0.00000  107.02278  356.4845 3307.2319 3109.8716  273.1099
## 10  843.55295  107.02278    0.00000  358.3833 3216.5888 3016.9010  186.8725
## 11  941.18944  356.48449  358.38330    0.0000 3094.1473 2910.3409  292.4479
## 12 2497.61393 3307.23185 3216.58879 3094.1473    0.0000  239.4276 3034.4303
## 13 2279.79445 3109.87159 3016.90105 2910.3409  239.4276    0.0000 2836.7633
## 14  710.31141  273.10986  186.87250  292.4479 3034.4303 2836.7633    0.0000
## 15 2480.85398 3376.93510 3277.39292 3220.2884  610.2805  524.4666 3106.5738
## 16  615.02364  656.06796  584.83237  432.9967 2672.2441 2483.7846  399.9623
## 17  576.99200  379.61774  272.87753  501.9585 3004.8045 2798.0643  209.5291
## 18  522.59438  441.36601  335.08813  558.9921 2969.3148 2760.4075  267.7254
## 19  324.93736  946.85108  843.95628 1054.0796 2745.3202 2519.7893  774.2586
## 20  367.00098  722.78484  620.22304  847.8756 2863.1327 2643.7914  561.0034
## 21  434.93283  965.18266  866.54041 1106.6261 2836.0974 2608.7184  819.3577
## 22  555.59357  394.63635  287.96062  475.9292 2963.4383 2758.1127  187.2987
## 23  387.81854  614.71128  509.63502  723.1301 2876.4464 2661.6380  437.4895
## 24  942.37819   44.91465  104.01917  398.0457 3319.6028 3120.4283  286.5791
## 25  532.18277  435.29125  329.42837  561.3511 2981.3409 2772.2665  269.3909
## 26  432.37324  583.95951  480.32214  712.5945 2921.1566 2706.4502  422.9542
## 27  482.68014 1386.38742 1279.92870 1419.6903 2358.5721 2125.3864 1172.1052
## 28  508.27906  464.71825  359.16203  589.3118 2966.0817 2755.9561  297.9414
## 29  849.50122  107.94388   28.56888  385.9990 3234.4210 3033.7790  209.8305
## 30  805.24774  197.61655  124.14069  478.1457 3230.4661 3025.7032  254.0607
## 31  647.28974  360.30886  263.81301  565.0464 3105.2498 2895.9323  282.2709
## 32  824.48438  142.15457   57.22182  413.4529 3223.1172 3021.0491  212.1430
## 33  652.89384  362.51532  267.66615  573.3684 3113.4830 2903.8736  291.8243
## 34  410.50097 1054.37598  953.29675 1173.4947 2747.8169 2518.8337  891.7023
##           15        16         17         18        19        20        21
## 1  2477.6823  665.1278  598.41685  541.27043  284.5696  356.4646  394.5270
## 2  1408.7783 1666.4635 1764.24699 1708.66271 1307.2360 1492.7718 1367.8598
## 3  2781.1335  519.5228  281.18057  222.38290  339.5891  174.4068  409.7823
## 4  2453.8461  698.2174  630.93263  573.07343  282.7773  376.6652  391.5140
## 5  2870.8795  506.5527  188.54850  128.44236  406.2138  203.1042  459.7567
## 6  2571.1081  663.3075  526.87874  466.68948  210.2163  260.1444  318.9625
## 7  3108.5199  557.8864   77.21504  119.13726  613.1994  389.2603  636.3143
## 8  2480.8540  615.0236  576.99200  522.59438  324.9374  367.0010  434.9328
## 9  3376.9351  656.0680  379.61774  441.36601  946.8511  722.7848  965.1827
## 10 3277.3929  584.8324  272.87753  335.08813  843.9563  620.2230  866.5404
## 11 3220.2884  432.9967  501.95849  558.99206 1054.0796  847.8756 1106.6261
## 12  610.2805 2672.2441 3004.80448 2969.31484 2745.3202 2863.1327 2836.0974
## 13  524.4666 2483.7846 2798.06430 2760.40755 2519.7893 2643.7914 2608.7184
## 14 3106.5738  399.9623  209.52915  267.72538  774.2586  561.0034  819.3577
## 15    0.0000 2787.4030 3036.32815 2990.80216 2672.8032 2829.2822 2747.7586
## 16 2787.4030    0.0000  492.53824  507.34758  837.0652  692.0827  922.8975
## 17 3036.3281  492.5382    0.00000   64.00805  579.8565  359.7025  615.5241
## 18 2990.8022  507.3476   64.00805    0.00000  515.9190  296.4133  553.2176
## 19 2672.8032  837.0652  579.85653  515.91901    0.0000  224.1064  110.1061
## 20 2829.2822  692.0827  359.70254  296.41327  224.1064    0.0000  258.7697
## 21 2747.7586  922.8975  615.52409  553.21758  110.1061  258.7697    0.0000
## 22 3002.3818  440.2501   52.62127   85.43250  587.8896  373.7490  632.2471
## 23 2868.6398  584.3285  241.24422  177.23624  338.9955  124.9339  383.5276
## 24 3381.3057  678.7630  367.04594  426.65537  924.4811  700.4679  938.4739
## 25 3001.7933  518.0717   61.87819   12.62975  518.7959  297.9682  553.6607
## 26 2913.0978  602.1852  218.84839  156.14673  363.7941  141.1853  397.0725
## 27 2230.0219 1091.4819 1007.12883  945.02688  477.9212  684.8025  529.0316
## 28 2981.4905  528.7445   92.10648   30.32697  488.3467  267.6060  523.6837
## 29 3290.7667  609.2166  274.80932  335.32603  838.9081  614.8411  857.9708
## 30 3268.0248  646.7475  231.85395  282.65562  762.5575  539.1720  773.3163
## 31 3122.4971  608.6795  118.10342  136.14740  590.3923  366.8070  604.8746
## 32 3273.2147  611.6488  247.83875  306.46942  805.6280  581.5223  823.0334
## 33 3129.1313  619.7465  128.99251  144.93094  590.4957  367.3366  602.9589
## 34 2648.4152  954.7672  693.83992  630.23733  120.7888  334.4461  106.9711
##            22         23         24         25         26        27         28
## 1   581.04311  394.38341  965.28877  550.05576  437.92053  438.7097  524.46901
## 2  1742.21939 1558.28818 2129.57686 1717.70780 1600.04762  839.5069 1692.33894
## 3   270.63964  101.40833  648.06662  230.97459  143.93421  728.8328  205.60794
## 4   614.60443  422.40308  997.94800  581.59880  465.32926  403.3750  555.52781
## 5   184.21955   80.79606  554.74970  136.88517   96.97751  818.8718  112.01051
## 6   515.78031  308.32339  893.27367  474.31488  350.30739  484.6074  446.93982
## 7   126.01156  282.31782  314.11154  109.55036  250.15783 1056.7189  135.70114
## 8   555.59357  387.81854  942.37819  532.18277  432.37324  482.6801  508.27906
## 9   394.63635  614.71128   44.91465  435.29125  583.95951 1386.3874  464.71825
## 10  287.96062  509.63502  104.01917  329.42837  480.32214 1279.9287  359.16203
## 11  475.92923  723.13006  398.04567  561.35114  712.59451 1419.6903  589.31181
## 12 2963.43835 2876.44636 3319.60276 2981.34087 2921.15658 2358.5721 2966.08173
## 13 2758.11268 2661.63800 3120.42832 2772.26653 2706.45018 2125.3864 2755.95605
## 14  187.29871  437.48955  286.57914  269.39094  422.95417 1172.1052  297.94138
## 15 3002.38180 2868.63977 3381.30573 3001.79328 2913.09777 2230.0219 2981.49052
## 16  440.25014  584.32855  678.76296  518.07173  602.18515 1091.4819  528.74447
## 17   52.62127  241.24422  367.04594   61.87819  218.84839 1007.1288   92.10648
## 18   85.43250  177.23624  426.65537   12.62975  156.14673  945.0269   30.32697
## 19  587.88963  338.99552  924.48111  518.79591  363.79415  477.9212  488.34666
## 20  373.74902  124.93388  700.46787  297.96822  141.18525  684.8025  267.60602
## 21  632.24713  383.52760  938.47390  553.66069  397.07248  529.0316  523.68370
## 22    0.00000  250.25736  387.74251   91.03415  236.68890  999.4388  115.33410
## 23  250.25736    0.00000  596.41812  180.96762   44.84981  774.7774  150.74806
## 24  387.74251  596.41812    0.00000  419.52477  563.49598 1370.4440  448.07510
## 25   91.03415  180.96762  419.52477    0.00000  157.00311  951.3699   30.45729
## 26  236.68890   44.84981  563.49598  157.00311    0.00000  810.8361  126.77956
## 27  999.43884  774.77739 1370.44401  951.36988  810.83613    0.0000  922.43555
## 28  115.33410  150.74806  448.07510   30.45729  126.77956  922.4355    0.00000
## 29  294.84788  507.32972   92.92668  328.71695  476.11243 1280.0861  357.79976
## 30  267.71253  441.51683  165.77952  273.30044  405.44396 1215.9652  298.94291
## 31  170.55442  271.89814  334.75831  123.96334  233.94326 1044.7718  141.09477
## 32  272.56822  476.03260  120.50326  299.13632  443.64100 1249.9410  327.58449
## 33  181.49253  275.27631  335.81567  132.59333  236.34870 1046.9068  148.27088
## 34  704.73447  454.67123 1029.79184  632.24169  475.62935  424.3779  601.82462
##            29         30         31         32         33        34
## 1   872.70073  823.20114  660.83292  846.22284  665.67375  362.6559
## 2  2036.66490 1990.97053 1827.99543 2011.83685 1832.41614 1263.8394
## 3   555.98398  504.11610  343.99049  528.31710  349.66572  460.3083
## 4   905.48488  854.44741  690.75052  878.61283  695.30762  350.3572
## 5   462.99203  410.06362  251.96184  434.74992  258.29425  524.7809
## 6   801.52884  745.40052  578.96198  773.15879  582.96373  308.8823
## 7   225.95607  163.75380   55.72323  193.80885   66.13523  722.1578
## 8   849.50122  805.24774  647.28974  824.48438  652.89384  410.5010
## 9   107.94388  197.61655  360.30886  142.15457  362.51532 1054.3760
## 10   28.56888  124.14069  263.81301   57.22182  267.66615  953.2967
## 11  385.99902  478.14575  565.04640  413.45287  573.36837 1173.4947
## 12 3234.42097 3230.46608 3105.24978 3223.11725 3113.48296 2747.8169
## 13 3033.77898 3025.70323 2895.93232 3021.04905 2903.87356 2518.8337
## 14  209.83050  254.06072  282.27085  212.14297  291.82432  891.7023
## 15 3290.76673 3268.02483 3122.49705 3273.21470 3129.13132 2648.4152
## 16  609.21664  646.74752  608.67946  611.64879  619.74650  954.7672
## 17  274.80932  231.85395  118.10342  247.83875  128.99251  693.8399
## 18  335.32603  282.65562  136.14740  306.46942  144.93094  630.2373
## 19  838.90808  762.55751  590.39227  805.62799  590.49568  120.7888
## 20  614.84107  539.17202  366.80697  581.52227  367.33658  334.4461
## 21  857.97080  773.31628  604.87461  823.03344  602.95893  106.9711
## 22  294.84788  267.71253  170.55442  272.56822  181.49253  704.7345
## 23  507.32972  441.51683  271.89814  476.03260  275.27631  454.6712
## 24   92.92668  165.77952  334.75831  120.50326  335.81567 1029.7918
## 25  328.71695  273.30044  123.96334  299.13632  132.59333  632.2417
## 26  476.11243  405.44396  233.94326  443.64100  236.34870  475.6294
## 27 1280.08606 1215.96516 1044.77177 1249.94095 1046.90683  424.3779
## 28  357.79976  298.94291  141.09477  327.58449  148.27088  601.8246
## 29    0.00000  101.41623  253.32041   36.45971  256.10382  946.5902
## 30  101.41623    0.00000  172.41033   66.92735  172.09523  865.8165
## 31  253.32041  172.41033    0.00000  218.16532   11.07060  695.0589
## 32   36.45971   66.92735  218.16532    0.00000  220.54507  912.4311
## 33  256.10382  172.09523   11.07060  220.54507    0.00000  694.1052
## 34  946.59021  865.81652  695.05887  912.43112  694.10524    0.0000
# menghiung stress
num <- sum((D - D_hat)^2)
den <- sum(D^2)
stress <- sqrt(num / den)
stress
## [1] 0.02528328
# menghitung R-Square
eig_pos <- values[values > 0]
R2 <- sum(eig_pos[1:2]) / sum(eig_pos)
R2
## [1] 0.9806235
# plot MDS
ggplot(mds_coords, aes(x = Dim1, y = Dim2)) +
  geom_point(size = 3) +
  geom_text(aes(label = Label), vjust = -0.8) +
  theme_minimal() +
  labs(title = "Plot MDS (Manual)", x = "Dimensi 1", y = "Dimensi 2")

3. HASIL DAN PEMBAHASAN

3.1 Langkah-langkah MDS

Berikut adalah langkah-langkah dari MDS:

  1. Menghitung matriks jarak

    Setelah data dibaca oleh R dengan fungsi read_excel, selanjutnya akan dihitung matriks jarak dengan jarak Euclidean seperti berikut.

#matriks jarak
dist_mat <- dist(data_num)
dist_mat
##             1          2          3          4          5          6          7
## 2  1193.18607                                                                  
## 3   324.46726 1514.16380                                                       
## 4   156.34577 1152.94883  389.99103                                            
## 5   419.39838 1606.70719  107.78683  468.50293                                 
## 6   127.52647 1280.66936  272.89558  240.73014  358.25689                      
## 7   665.80177 1847.84767  345.96676  710.05774  265.09055  606.47259           
## 8    77.72387 1205.88225  318.37713  130.25744  405.19625  167.75577  651.28105
## 9   978.88712 2152.20329  663.35134 1015.32556  570.51643  919.11642  341.45864
## 10  872.16627 2042.92756  559.63113  905.92163  467.29541  814.30891  244.97347
## 11  987.65075 2091.21998  729.54849 1043.79308  669.68724  950.02579  534.09924
## 12 2523.43773 1647.70719 2800.95466 2511.22201 2882.03175 2617.22620 3101.71727
## 13 2322.36367 1487.06355 2590.83384 2304.76832 2676.17600 2430.45016 2890.50636
## 14  749.75996 1901.34663  456.95186  783.92091  377.64666  709.21012  242.13220
## 15 2491.98876 1487.78997 2790.20770 2475.27897 2878.19926 2584.81469 3119.87788
## 16  676.29875 1671.38117  546.76229  707.10112  533.27198  682.54890  583.94178
## 17  616.06087 1789.14784  301.77806  646.55472  214.55069  568.27986  125.16789
## 18  562.24194 1736.13680  248.99197  598.06354  181.66728  519.07899  138.62179
## 19  300.60439 1333.77209  356.24711  358.23037  434.09216  254.21251  621.48773
## 20  358.10613 1510.30427  187.30456  396.25497  212.43117  277.95143  401.32530
## 21  412.47424 1383.01482  432.82560  393.40691  473.16171  363.73342  652.38256
## 22  581.29081 1760.53628  278.10070  637.21974  200.99254  520.58237  161.35365
## 23  409.05623 1576.20747  141.06736  433.20088  126.87001  360.03333  292.03596
## 24  969.05521 2144.68809  651.82129 1003.80775  558.06003  907.05513  321.85711
## 25  553.84926 1740.16493  231.62038  603.27191  147.22092  491.76010  121.84827
## 26  446.44485 1624.91846  151.26136  488.53557  115.89651  384.44766  253.63557
## 27  475.69948  914.30247  741.88476  477.99582  838.11395  543.82994 1061.64778
## 28  534.56805 1723.20457  215.93518  599.86582  160.04999  471.54427  154.78049
## 29  877.56937 2052.79151  560.57025  913.59510  469.93936  819.51754  230.87226
## 30  826.53252 2006.50069  508.24699  861.30366  413.94082  759.80853  177.73576
## 31  662.58811 1846.82809  348.80940  715.44042  270.91696  588.51338   94.19660
## 32  848.04304 2028.61578  529.47332  891.23678  440.17724  784.46925  197.60314
## 33  668.10104 1850.00865  352.33223  709.07193  267.16661  598.75037   77.29812
## 34  375.19861 1284.85057  476.98532  406.32253  549.30411  339.56295  731.72263
##             8          9         10         11         12         13         14
## 2                                                                              
## 3                                                                              
## 4                                                                              
## 5                                                                              
## 6                                                                              
## 7                                                                              
## 8                                                                              
## 9   953.58219                                                                  
## 10  845.64709  112.44554                                                       
## 11  953.48991  394.98354  396.02778                                            
## 12 2512.65577 3325.90499 3233.34100 3106.52281                                 
## 13 2316.23747 3128.67688 3038.01366 2942.73121  700.83450                      
## 14  715.77441  275.13633  189.33040  342.18416 3054.98183 2856.95975           
## 15 2497.50936 3385.04741 3288.19069 3235.99135  801.67699  660.82600 3117.10539
## 16  620.98712  673.65125  597.49142  464.66978 2681.17885 2526.05285  425.22229
## 17  593.93771  384.97662  285.57486  547.48790 3032.94955 2813.31477  218.09860
## 18  545.63633  450.48196  351.26628  597.90802 2998.71639 2772.08207  282.57742
## 19  353.31289  958.55777  856.77710 1056.97635 2761.59754 2548.87465  790.58776
## 20  368.79669  725.80851  622.93980  857.69692 2877.68136 2673.95718  566.64098
## 21  440.49064  969.36319  868.92980 1126.24287 2853.14020 2639.56587  823.26241
## 22  560.09821  406.79602  304.42897  486.68573 2976.61670 2788.42429  221.70927
## 23  398.15324  616.56387  510.79448  746.37859 2898.06297 2681.71438  438.45980
## 24  945.39040   46.84015  106.97663  434.07603 3337.77021 3139.07009  288.11803
## 25  540.54787  438.14039  337.05638  577.03293 3001.44915 2793.67142  279.22572
## 26  443.99324  585.20338  484.37898  731.05335 2943.88977 2725.27283  427.31370
## 27  527.70352 1395.51496 1292.18497 1434.48318 2400.32373 2138.67178 1184.17144
## 28  530.01509  480.02396  384.99740  603.52713 2988.69888 2776.22910  330.16208
## 29  854.18675  113.73654   49.87986  421.94786 3253.86140 3050.74597  213.78962
## 30  807.85333  198.49433  126.09520  505.79047 3247.98861 3045.92630  256.74501
## 31  654.77172  374.99200  284.77184  571.40616 3119.93926 2920.85809  307.00326
## 32  828.49502  151.97697   84.59905  432.99769 3240.11435 3040.83245  223.93526
## 33  657.09664  365.65968  272.81679  589.37170 3130.87799 2924.43499  298.93979
## 34  429.64753 1065.87523  964.42522 1176.25337 2760.59704 2551.63653  906.39837
##            15         16         17         18         19         20         21
## 2                                                                              
## 3                                                                              
## 4                                                                              
## 5                                                                              
## 6                                                                              
## 7                                                                              
## 8                                                                              
## 9                                                                              
## 10                                                                             
## 11                                                                             
## 12                                                                             
## 13                                                                             
## 14                                                                             
## 15                                                                             
## 16 2811.27907                                                                  
## 17 3044.73069  533.11819                                                       
## 18 3001.82345  551.75901   89.22444                                            
## 19 2692.01393  854.05562  611.40821  542.93186                                 
## 20 2841.47602  700.45699  382.29177  330.81415  255.98242                      
## 21 2763.45490  928.83099  628.30407  575.78729  226.51711  273.77180           
## 22 3014.23340  459.50082  168.39240  184.78907  595.11175  376.96286  646.69313
## 23 2881.87352  601.38590  250.62721  194.56361  373.06300  153.89932  392.46656
## 24 3390.24070  694.27516  373.00804  435.75911  936.38507  703.63627  942.10880
## 25 3010.46757  544.10569  113.50771  100.07497  530.79375  305.46195  568.87257
## 26 2922.34752  626.81018  229.84342  170.97661  386.42722  164.07620  415.91345
## 27 2246.89519 1124.68573 1018.18220  950.02421  502.01096  712.17273  581.01893
## 28 2991.49210  570.77754  176.23847  129.51062  496.27412  295.81582  560.19104
## 29 3300.97258  628.26746  282.92225  342.11402  849.85940  620.24673  864.01678
## 30 3277.53322  661.25940  244.63238  298.74738  775.49017  542.05350  777.53006
## 31 3134.61242  627.24875  195.41238  198.85422  592.90134  374.66385  625.27274
## 32 3283.11361  629.47041  268.48091  321.79030  811.39017  584.71446  832.16104
## 33 3139.81098  635.93632  162.75134  173.72104  599.44307  371.88842  613.49980
## 34 2670.76206  965.03368  723.70643  657.07382  126.81877  355.13659  215.12554
##            22         23         24         25         26         27         28
## 2                                                                              
## 3                                                                              
## 4                                                                              
## 5                                                                              
## 6                                                                              
## 7                                                                              
## 8                                                                              
## 9                                                                              
## 10                                                                             
## 11                                                                             
## 12                                                                             
## 13                                                                             
## 14                                                                             
## 15                                                                             
## 16                                                                             
## 17                                                                             
## 18                                                                             
## 19                                                                             
## 20                                                                             
## 21                                                                             
## 22                                                                             
## 23  279.64621                                                                  
## 24  400.62326  597.57928                                                       
## 25  116.83321  199.26866  423.42532                                            
## 26  256.21866   77.58866  565.04425  160.77313                                 
## 27 1016.95182  791.39560 1379.88115  960.83974  820.20912                      
## 28  153.19269  208.07210  465.17631   80.34924  154.38264  927.91756           
## 29  313.63514  508.30011   97.24197  333.75890  477.31436 1287.52476  375.35450
## 30  282.37387  443.61808  166.20469  278.53007  407.79039 1226.98981  322.58797
## 31  176.39161  298.30857  351.05128  140.00000  250.44760 1055.75329  156.85025
## 32  280.56372  481.60565  132.36691  300.43635  445.31337 1257.18535  336.66007
## 33  194.44794  282.59158  339.02360  137.17143  239.28226 1056.21068  172.16852
## 34  710.88607  480.97297 1041.16185  645.07441  497.22932  462.79153  613.97313
##            29         30         31         32         33
## 2                                                        
## 3                                                        
## 4                                                        
## 5                                                        
## 6                                                        
## 7                                                        
## 8                                                        
## 9                                                        
## 10                                                       
## 11                                                       
## 12                                                       
## 13                                                       
## 14                                                       
## 15                                                       
## 16                                                       
## 17                                                       
## 18                                                       
## 19                                                       
## 20                                                       
## 21                                                       
## 22                                                       
## 23                                                       
## 24                                                       
## 25                                                       
## 26                                                       
## 27                                                       
## 28                                                       
## 29                                                       
## 30  106.50822                                            
## 31  272.50138  197.80040                                 
## 32   59.99167   82.62566  224.73095                      
## 33  259.12738  176.59841   62.88084  220.85289           
## 34  957.34529  877.77560  698.54348  918.80194  703.00711
  1. Mencari nilai eigen dan vektor eigen
#nilai eigen dan vektor eigen
J <- diag(n) - (1/n) * matrix(1, n, n)
B <- -0.5 * J %*% D2 %*% J
B
##              [,1]       [,2]        [,3]        [,4]        [,5]         [,6]
##  [1,]   48039.032   261526.9  -13535.380   51089.944  -31122.880   42664.0026
##  [2,]  261526.885  1898707.7 -181907.527  324000.797 -308595.027  156072.8555
##  [3,]  -13535.380  -181907.5   30169.208  -21669.468   42080.708    4624.5908
##  [4,]   51089.944   324000.8  -21669.468   78584.856  -37649.968   37092.9144
##  [5,]  -31122.880  -308595.0   42080.708  -37649.968   65610.208   -4592.9092
##  [6,]   42664.003   156072.9    4624.591   37092.914   -4592.909   53551.9732
##  [7,]  -79245.292  -639535.4   73619.297  -94417.380  116049.797  -38747.3209
##  [8,]   38415.973   239694.8  -18180.439   48225.885  -31869.939   30121.9438
##  [9,] -149874.027 -1061419.2  100283.561 -170934.115  175277.061  -90395.0562
## [10,] -128144.233  -909249.4   86664.356 -142881.321  151795.856  -76600.2621
## [11,] -159581.674  -933120.8   53089.914 -201333.762  112690.414 -120372.7033
## [12,]  310075.650  3061809.5 -437663.762  356099.561 -650323.262   71764.6202
## [13,]  276567.591  2792909.4 -391890.821  332548.503 -598919.321   22466.5614
## [14,] -112041.880  -713197.0   55690.708 -122964.968  106505.208  -79704.9092
## [15,]  399609.885  3323188.7 -396950.527  456383.797 -628616.027  166736.8555
## [16,]  -84398.792  -327131.9  -14118.203  -90431.880   10887.297  -85888.8209
## [17,]  -75052.380  -560477.5   60243.208  -79030.468  100482.708  -44001.4092
## [18,]  -61852.850  -485546.0   56271.738  -67361.939   88489.238  -35759.8798
## [19,]   55092.032   136133.9   27882.620   51381.944   14841.120   70718.0026
## [20,]    6858.826  -144196.3   44502.414    7742.738   57200.914   35106.7967
## [21,]   56222.473   110259.3   38686.061   79178.385   38134.561   77895.4438
## [22,]  -67868.821  -523329.0   53475.767  -86670.909   89667.267  -31665.8503
## [23,]  -21997.409  -255214.6   42781.179  -16892.497   62403.679    -389.4386
## [24,] -144513.968 -1049489.1  103649.620 -163522.056  178090.120  -83597.9974
## [25,]  -57835.233  -493213.4   59780.356  -71156.321   93487.856  -22618.2621
## [26,]  -26269.850  -321459.0   53011.738  -30673.939   75456.238    2243.1202
## [27,]  134767.444   755272.3  -36218.968  148945.356  -94519.468  102793.4144
## [28,]  -50502.821  -467004.0   60129.767  -72267.909   88356.267  -16041.8503
## [29,] -127679.409  -924257.6   91330.179 -144670.497  155748.679  -75663.4386
## [30,] -108745.174  -854855.3   94740.414 -122816.262  155944.914  -53065.2033
## [31,]  -69652.174  -630193.3   80090.414  -90795.262  121946.914  -20558.2033
## [32,] -118325.497  -891043.6   92157.091 -140615.586  153170.591  -63676.5268
## [33,]  -71752.115  -634504.3   80423.473  -84691.203  124523.973  -25067.1445
## [34,]   79062.120   249363.0   26756.708   82173.032    7367.208   94554.0908
##               [,7]        [,8]        [,9]       [,10]       [,11]        [,12]
##  [1,]   -79245.292   38415.973  -149874.03  -128144.23  -159581.67   310075.650
##  [2,]  -639535.439  239694.826 -1061419.17  -909249.38  -933120.82  3061809.503
##  [3,]    73619.297  -18180.439   100283.56    86664.36    53089.91  -437663.762
##  [4,]   -94417.380   48225.885  -170934.12  -142881.32  -201333.76   356099.561
##  [5,]   116049.797  -31869.939   175277.06   151795.86   112690.41  -650323.262
##  [6,]   -38747.321   30121.944   -90395.06   -76600.26  -120372.70    71764.620
##  [7,]   236762.385  -76285.350   365300.65   316548.44   279876.00 -1222018.674
##  [8,]   -76285.350   34833.914  -132026.09  -111969.29  -133028.73   330622.591
##  [9,]   365300.650 -132026.086   610432.91   527067.71   531336.27 -1755680.409
## [10,]   316548.444 -111969.292   527067.71   456346.50   453880.06 -1529148.615
## [11,]   279876.003 -133028.733   531336.27   453880.06   608251.62 -1051191.056
## [12,] -1222018.674  330622.591 -1755680.41 -1529148.62 -1051191.06  6939850.267
## [13,] -1109897.733  284173.532 -1639858.47 -1437355.67 -1076473.12  6173575.208
## [14,]   234075.797  -93740.939   412375.06   355258.86   390589.41 -1051523.262
## [15,] -1267843.439  379234.826 -1943462.17 -1697331.38 -1451099.82  6629176.503
## [16,]    68158.885  -55123.850   198585.15   169946.94   316438.50    -4163.174
## [17,]   201241.297  -68270.439   321806.56   278090.36   244947.91 -1038772.762
## [18,]   180958.826  -59256.909   275935.09   238664.88   197564.44  -954039.233
## [19,]     1511.708   31255.973   -77946.03   -62606.23  -178219.67  -267031.350
## [20,]    84809.503   -3629.233    88776.77    81105.56   -16736.88  -623640.556
## [21,]    22850.150   37671.414   -47345.59   -32075.79  -212815.23  -483008.909
## [22,]   182424.856  -62376.880   299536.12   258895.91   262755.47  -883137.203
## [23,]   113385.267  -24199.468   152787.53   135364.33    63231.88  -691812.792
## [24,]   367585.708 -128464.027   605119.97   523451.77   510915.33 -1799429.350
## [25,]   182477.444  -57159.292   280752.71   242889.50   209162.06  -962903.615
## [26,]   135582.826  -31780.909   183352.09   160228.88    86273.44  -813951.233
## [27,]  -221273.880  102074.385  -444621.62  -382804.82  -500852.26   813041.061
## [28,]   174761.856  -54681.880   258364.12   222420.91   190362.47  -927876.203
## [29,]   325095.267 -114035.468   532113.53   460294.33   448470.88 -1590516.792
## [30,]   311399.503 -100083.233   494329.77   429036.56   385027.12 -1595976.556
## [31,]   239784.503  -71106.233   360746.77   313465.56   266713.12 -1271245.556
## [32,]   316101.179 -108541.556   510911.44   441838.24   427625.80 -1562001.880
## [33,]   242801.561  -71063.174   365770.83   318366.62   257854.18 -1303865.497
## [34,]   -23898.203   50548.061  -137398.94  -111455.14  -262230.59  -215093.262
##             [,13]       [,14]       [,15]       [,16]       [,17]      [,18]
##  [1,]   276567.59  -112041.88   399609.88  -84398.792   -75052.38  -61852.85
##  [2,]  2792909.44  -713197.03  3323188.74 -327131.939  -560477.53 -485546.00
##  [3,]  -391890.82    55690.71  -396950.53  -14118.203    60243.21   56271.74
##  [4,]   332548.50  -122964.97   456383.80  -90431.880   -79030.47  -67361.94
##  [5,]  -598919.32   106505.21  -628616.03   10887.297   100482.71   88489.24
##  [6,]    22466.56   -79704.91   166736.86  -85888.821   -44001.41  -35759.88
##  [7,] -1109897.73   234075.80 -1267843.44   68158.885   201241.30  180958.83
##  [8,]   284173.53   -93740.94   379234.83  -55123.850   -68270.44  -59256.91
##  [9,] -1639858.47   412375.06 -1943462.17  198585.150   321806.56  275935.09
## [10,] -1437355.67   355258.86 -1697331.38  169946.944   278090.36  238664.88
## [11,] -1076473.12   390589.41 -1451099.82  316438.503   244947.91  197564.44
## [12,]  6173575.21 -1051523.26  6629176.50   -4163.174 -1038772.76 -954039.23
## [13,]  5898469.15  -986866.32  6211483.44 -120965.233  -917441.82 -820799.29
## [14,]  -986866.32   290017.21 -1232570.03  174873.297   211918.71  177269.24
## [15,]  6211483.44 -1232570.03  6961188.74 -350778.939 -1063904.53 -952692.00
## [16,]  -120965.23   174873.30  -350778.94  240543.385    68857.80   40238.33
## [17,]  -917441.82   211918.71 -1063904.53   68857.797   181387.21  158898.74
## [18,]  -820799.29   177269.24  -952692.00   40238.326   158898.74  144371.27
## [19,]  -222892.41   -91251.88   -66621.12 -168179.792   -19962.38    1052.15
## [20,]  -578829.62    31426.91  -509439.32  -78088.997    64579.41   64425.94
## [21,]  -417148.97   -76601.44  -220476.67 -193821.350    10581.06   23690.59
## [22,]  -861359.26   197492.27  -985145.97   91762.356   153576.77  132173.30
## [23,]  -608914.85    86531.68  -634356.56  -22914.233    96933.18   90904.71
## [24,] -1676645.41   404503.12 -1965271.12  180263.208   322126.62  278243.15
## [25,]  -881545.67   177544.86  -979343.38   43765.944   155771.36  138697.88
## [26,]  -714954.29   103077.24  -740096.00  -26806.674   113646.74  106936.27
## [27,]   886169.00  -332229.47  1180218.30 -288294.380  -203760.97 -155194.44
## [28,]  -836130.26   158864.27  -925558.97   25737.356   143522.77  132158.30
## [29,] -1470925.85   355520.68 -1734250.56  156276.767   284036.18  247029.71
## [30,] -1480785.62   320862.91 -1681704.32  110453.003   269584.41  236373.94
## [31,] -1190631.62   223722.91 -1306463.32   49391.003   197440.41  178253.94
## [32,] -1456852.94   337178.59 -1691579.64  139398.679   271896.09  237654.62
## [33,] -1199517.56   227733.97 -1321204.26   45472.061   204857.47  184504.00
## [34,]  -180760.32  -140340.79    39538.97 -219943.703   -45752.29  -18257.76
##             [,19]       [,20]      [,21]      [,22]        [,23]       [,24]
##  [1,]   55092.032    6858.826   56222.47  -67868.82  -21997.4092  -144513.97
##  [2,]  136133.885 -144196.321  110259.33 -523328.97 -255214.5562 -1049489.12
##  [3,]   27882.620   44502.414   38686.06   53475.77   42781.1791   103649.62
##  [4,]   51381.944    7742.738   79178.38  -86670.91  -16892.4974  -163522.06
##  [5,]   14841.120   57200.914   38134.56   89667.27   62403.6791   178090.12
##  [6,]   70718.003   35106.797   77895.44  -31665.85    -389.4386   -83598.00
##  [7,]    1511.708   84809.503   22850.15  182424.86  113385.2673   367585.71
##  [8,]   31255.973   -3629.233   37671.41  -62376.88  -24199.4680  -128464.03
##  [9,]  -77946.027   88776.767  -47345.59  299536.12  152787.5320   605119.97
## [10,]  -62606.233   81105.561  -32075.79  258895.91  135364.3261   523451.77
## [11,] -178219.674  -16736.880 -212815.23  262755.47   63231.8849   510915.33
## [12,] -267031.350 -623640.556 -483008.91 -883137.20 -691812.7915 -1799429.35
## [13,] -222892.409 -578829.615 -417148.97 -861359.26 -608914.8503 -1676645.41
## [14,]  -91251.880   31426.914  -76601.44  197492.27   86531.6791   404503.12
## [15,]  -66621.115 -509439.321 -220476.67 -985145.97 -634356.5562 -1965271.12
## [16,] -168179.792  -78088.997 -193821.35   91762.36  -22914.2327   180263.21
## [17,]  -19962.380   64579.414   10581.06  153576.77   96933.1791   322126.62
## [18,]    1052.150   64425.944   23690.59  132173.30   90904.7085   278243.15
## [19,]  152508.032   90449.826  167869.47  -23763.82   44312.5908   -61153.97
## [20,]   90449.826   93918.620  126754.27   52969.97   72763.3849   100407.83
## [21,]  167869.473  126754.267  234540.91  -14774.38   77902.0320   -25513.53
## [22,]  -23763.821   52969.973  -14774.38  154122.33   75606.7379   297812.18
## [23,]   44312.591   72763.385   77902.03   75606.74   75293.1497   160096.59
## [24,]  -61153.968  100407.826  -25513.53  297812.18  160096.5908   602001.03
## [25,]    6902.767   71825.561   26982.21  141755.91   89312.3261   282875.77
## [26,]   50958.150   82865.944   80145.59   93604.30   84003.7085   190730.15
## [27,]  174139.444   17257.238  172371.88 -216141.41  -51613.9974  -427142.56
## [28,]   21469.179   71564.973   28722.62  133686.33   84358.7379   261165.18
## [29,]  -51511.409   87971.385  -22626.97  261242.74  141827.1497   529637.59
## [30,]  -15625.174  108861.620   23807.27  246006.97  148061.3849   496001.83
## [31,]   26327.826  102612.620   47627.27  187343.97  118992.3849   365221.83
## [32,]  -35679.497   93257.297  -11732.06  254946.65  138918.0614   509483.50
## [33,]   23995.885  105216.679   56487.33  185564.03  125125.4438   370939.88
## [34,]  193642.120  109327.914  219560.56  -50188.73   47408.6791  -115578.88
##             [,25]      [,26]      [,27]       [,28]       [,29]       [,30]
##  [1,]  -57835.233  -26269.85  134767.44  -50502.821  -127679.41  -108745.17
##  [2,] -493213.380 -321459.00  755272.30 -467003.968  -924257.56  -854855.32
##  [3,]   59780.356   53011.74  -36218.97   60129.767    91330.18    94740.41
##  [4,]  -71156.321  -30673.94  148945.36  -72267.909  -144670.50  -122816.26
##  [5,]   93487.856   75456.24  -94519.47   88356.267   155748.68   155944.91
##  [6,]  -22618.262    2243.12  102793.41  -16041.850   -75663.44   -53065.20
##  [7,]  182477.444  135582.83 -221273.88  174761.856   325095.27   311399.50
##  [8,]  -57159.292  -31780.91  102074.38  -54681.880  -114035.47  -100083.23
##  [9,]  280752.708  183352.09 -444621.62  258364.120   532113.53   494329.77
## [10,]  242889.503  160228.88 -382804.82  222420.914   460294.33   429036.56
## [11,]  209162.061   86273.44 -500852.26  190362.473   448470.88   385027.12
## [12,] -962903.615 -813951.23  813041.06 -927876.203 -1590516.79 -1595976.56
## [13,] -881545.674 -714954.29  886169.00 -836130.262 -1470925.85 -1480785.62
## [14,]  177544.856  103077.24 -332229.47  158864.267   355520.68   320862.91
## [15,] -979343.380 -740096.00 1180218.30 -925558.968 -1734250.56 -1681704.32
## [16,]   43765.944  -26806.67 -288294.38   25737.356   156276.77   110453.00
## [17,]  155771.356  113646.74 -203760.97  143522.767   284036.18   269584.41
## [18,]  138697.885  106936.27 -155194.44  132158.297   247029.71   236373.94
## [19,]    6902.767   50958.15  174139.44   21469.179   -51511.41   -15625.17
## [20,]   71825.561   82865.94   17257.24   71564.973    87971.38   108861.62
## [21,]   26982.208   80145.59  172371.88   28722.620   -22626.97    23807.27
## [22,]  141755.914   93604.30 -216141.41  133686.326   261242.74   246006.97
## [23,]   89312.326   84003.71  -51614.00   84358.738   141827.15   148061.38
## [24,]  282875.767  190730.15 -427142.56  261165.179   529637.59   496001.83
## [25,]  143039.503  107962.88 -166193.82  136650.914   249187.33   241543.56
## [26,]  107962.885   98734.27  -63111.44  105809.297   168817.71   175033.94
## [27,] -166193.821  -63111.44  447785.86 -138263.409  -371602.00  -320045.76
## [28,]  136650.914  105809.30 -138263.41  136718.326   231278.74   225140.97
## [29,]  249187.326  168817.71 -371602.00  231278.738   466730.15   436506.38
## [30,]  241543.561  175033.94 -320045.76  225140.973   436506.38   417626.62
## [31,]  187559.561  143844.94 -207574.76  181897.973   322076.38   315090.62
## [32,]  243632.238  167458.62 -349121.09  228932.650   448809.06   422643.30
## [33,]  189519.620  148147.00 -206489.70  180946.032   327199.44   320627.68
## [34,]  -11111.144   51178.24  242234.53    5307.267   -99460.32   -51002.09
##              [,31]       [,32]        [,33]       [,34]
##  [1,]   -69652.174  -118325.50   -71752.115   79062.120
##  [2,]  -630193.321  -891043.64  -634504.262  249362.973
##  [3,]    80090.414    92157.09    80423.473   26756.708
##  [4,]   -90795.262  -140615.59   -84691.203   82173.032
##  [5,]   121946.914   153170.59   124523.973    7367.208
##  [6,]   -20558.203   -63676.53   -25067.144   94554.091
##  [7,]   239784.503   316101.18   242801.561  -23898.203
##  [8,]   -71106.233  -108541.56   -71063.174   50548.061
##  [9,]   360746.767   510911.44   365770.826 -137398.939
## [10,]   313465.561   441838.24   318366.620 -111455.144
## [11,]   266713.120   427625.80   257854.179 -262230.586
## [12,] -1271245.556 -1562001.88 -1303865.497 -215093.262
## [13,] -1190631.615 -1456852.94 -1199517.556 -180760.321
## [14,]   223722.914   337178.59   227733.973 -140340.792
## [15,] -1306463.321 -1691579.64 -1321204.262   39538.973
## [16,]    49391.003   139398.68    45472.061 -219943.703
## [17,]   197440.414   271896.09   204857.473  -45752.292
## [18,]   178253.944   237654.62   184504.003  -18257.762
## [19,]    26327.826   -35679.50    23995.885  193642.120
## [20,]   102612.620    93257.30   105216.679  109327.914
## [21,]    47627.267   -11732.06    56487.326  219560.561
## [22,]   187343.973   254946.65   185564.032  -50188.733
## [23,]   118992.385   138918.06   125125.444   47408.679
## [24,]   365221.826   509483.50   370939.885 -115578.880
## [25,]   187559.561   243632.24   189519.620  -11111.144
## [26,]   143844.944   167458.62   148147.003   51178.238
## [27,]  -207574.762  -349121.09  -206489.703  242234.532
## [28,]   181897.973   228932.65   180946.032    5307.267
## [29,]   322076.385   448809.06   327199.444  -99460.321
## [30,]   315090.620   422643.30   320627.679  -51002.086
## [31,]   251679.620   317831.30   251270.679    7287.914
## [32,]   317831.297   434486.97   320263.356  -79425.409
## [33,]   251270.679   320263.36   254815.738    5727.973
## [34,]     7287.914   -79425.41     5727.973  250859.208
eigen_decomp <- eigen(B)
values <- eigen_decomp$values
vectors <- eigen_decomp$vectors
values
##  [1]  2.593329e+07  2.496920e+06  3.433420e+05  1.164946e+05  9.142386e+04
##  [6]  1.050316e+04  1.526936e-09  1.253976e-09  9.334625e-10  7.057659e-10
## [11]  6.746188e-10  5.278365e-10  1.609695e-10  1.244778e-10  1.037466e-10
## [16]  1.935234e-11 -8.800055e-11 -1.062780e-10 -1.363508e-10 -1.646751e-10
## [21] -1.728773e-10 -1.908670e-10 -2.237440e-10 -2.445036e-10 -2.550743e-10
## [26] -3.077544e-10 -3.753473e-10 -4.919893e-10 -5.207728e-10 -6.251737e-10
## [31] -6.504843e-10 -6.592162e-10 -8.339437e-10 -9.270070e-10
vectors
##               [,1]         [,2]          [,3]         [,4]         [,5]
##  [1,] -0.029001990 -0.097207596  0.0628064825 -0.099668539 -0.014121155
##  [2,] -0.249606787 -0.299167050  0.3159157898  0.438548329  0.003080997
##  [3,]  0.030777060 -0.036672471 -0.0345681474 -0.124940875 -0.013415713
##  [4,] -0.033858105 -0.113259566  0.0669477209  0.265975053  0.274184254
##  [5,]  0.048325010 -0.018036064 -0.0226623623 -0.123033665  0.154678396
##  [6,] -0.010843738 -0.115721509  0.1372673681 -0.299645194  0.037356298
##  [7,]  0.094596489  0.027402873 -0.0669991493  0.020399129 -0.112358444
##  [8,] -0.028185268 -0.063760406  0.0884834530  0.022673476  0.096615382
##  [9,]  0.144396905  0.164782342 -0.0423838010  0.016427551  0.117428349
## [10,]  0.125673902  0.134019682  0.0007361369  0.084317101  0.108720957
## [11,]  0.104629195  0.350442915  0.1099222998 -0.177661202 -0.263190260
## [12,] -0.502938666  0.332943203  0.5413808772 -0.038292621 -0.121821280
## [13,] -0.465838349  0.239869480 -0.5568329311  0.346508825 -0.268264994
## [14,]  0.090799496  0.170815335 -0.0364794892  0.099116953  0.123160344
## [15,] -0.515330501 -0.051199764 -0.2484710380 -0.496490449  0.432573539
## [16,]  0.021642007  0.290784490  0.2028379543  0.157837134  0.050879062
## [17,]  0.080195520  0.042695115 -0.1375620717  0.089815354  0.161215434
## [18,]  0.071629432  0.013051856 -0.1642557498  0.115439690 -0.025065032
## [19,]  0.006358853 -0.236653739  0.0463769693 -0.088014593 -0.330339296
## [20,]  0.039513559 -0.143393479  0.0622979799 -0.045693185  0.074806838
## [21,]  0.018991001 -0.293204584  0.0628131485  0.153928347  0.262402016
## [22,]  0.073101646  0.066908844  0.0712739170 -0.142121154 -0.037823044
## [23,]  0.047951572 -0.069153327 -0.0395036413  0.151233035  0.075494155
## [24,]  0.146080654  0.136881070 -0.0357171617  0.047814143  0.109082678
## [25,]  0.073826773  0.009345708 -0.0423208223 -0.082227910 -0.002300992
## [26,]  0.056668507 -0.073203783 -0.0756718309 -0.014542579  0.019122847
## [27,] -0.084781365 -0.308789104 -0.2120917221 -0.020584352 -0.292137218
## [28,]  0.069966740 -0.005377223 -0.0764519699 -0.181886065 -0.202607796
## [29,]  0.128714184  0.118825179 -0.0542386824  0.077193464  0.028390344
## [30,]  0.125551677  0.055458786 -0.0191530138  0.033805205  0.095905765
## [31,]  0.097671301 -0.006440417  0.0308560025 -0.118154431 -0.156075988
## [32,]  0.125759620  0.097808161 -0.0203938271 -0.030397500 -0.046167316
## [33,]  0.099010718 -0.011958633 -0.0168734057 -0.005343188 -0.027384566
## [34,] -0.001447051 -0.308836321  0.1027147174 -0.032335289 -0.312024561
##               [,6]         [,7]         [,8]         [,9]       [,10]
##  [1,] -0.098604987  0.000000000  0.000000000  0.000000000  0.73601735
##  [2,]  0.518409826  0.032089999 -0.101580690 -0.016389586  0.11463138
##  [3,]  0.010726977  0.126418970 -0.608002977  0.194975915 -0.21552126
##  [4,] -0.128298252  0.043656142  0.250032511  0.033632405  0.02488252
##  [5,] -0.101715951  0.128112997 -0.049905165 -0.011008966 -0.11105806
##  [6,] -0.028400650  0.482205683  0.002483104  0.014036185  0.05497054
##  [7,] -0.087030782 -0.280694289  0.145323850 -0.377487490 -0.01730996
##  [8,] -0.213752264  0.165656473  0.076043773 -0.230566067 -0.15357064
##  [9,]  0.017799531  0.051755846 -0.364308294 -0.478996317  0.12461465
## [10,] -0.009597772 -0.444925834 -0.196600832  0.070180727  0.07962442
## [11,]  0.581142167  0.114719974 -0.020365593 -0.151666311 -0.05240049
## [12,] -0.330616076 -0.095759969 -0.269090027  0.001401874  0.06515581
## [13,] -0.104402327  0.246309819 -0.043638025  0.098851928 -0.04486862
## [14,]  0.186662477 -0.004315357 -0.085862063  0.304992919  0.10385017
## [15,]  0.245607589 -0.218653601  0.022293491 -0.126149254 -0.07695147
## [16,]  0.017471719  0.122339540  0.074680891 -0.231929232 -0.16578514
## [17,]  0.150289156  0.082912969 -0.109017616  0.016363368  0.22325761
## [18,] -0.037498086  0.065513792 -0.126353472 -0.151025507  0.13547275
## [19,]  0.013835671 -0.087105442  0.052595274  0.059693039 -0.09589414
## [20,]  0.003969032  0.132367726 -0.094121468  0.003414284 -0.10340484
## [21,] -0.107117045  0.109678202 -0.283930415 -0.056142287 -0.13363097
## [22,] -0.112324296  0.110292830  0.058055928  0.196953914  0.01227428
## [23,]  0.011400296 -0.035440359 -0.100667975 -0.114132593 -0.24820300
## [24,] -0.044132915 -0.232222582 -0.081163308  0.280932271 -0.09559208
## [25,]  0.082614094  0.082615845 -0.067659018  0.162971798  0.07334836
## [26,] -0.068696788  0.036546001 -0.142639103  0.061489268  0.14485815
## [27,] -0.009834239 -0.057486471 -0.219934392 -0.202479876  0.08992258
## [28,] -0.087291597  0.028641524 -0.047108884 -0.141696574  0.11614750
## [29,] -0.069976415 -0.116020263 -0.069503725 -0.132192419 -0.05000722
## [30,] -0.072095464  0.189930445 -0.041234055 -0.181421814  0.05376099
## [31,] -0.005909755 -0.062049294 -0.046652890  0.097194511 -0.15782235
## [32,] -0.026701674  0.237877942  0.070538279  0.107142508  0.01403375
## [33,] -0.076681649 -0.147660359 -0.195830897  0.104476878  0.08231215
## [34,] -0.019249549 -0.140612682 -0.028654943 -0.023531537 -0.14737458
##              [,11]         [,12]         [,13]        [,14]       [,15]
##  [1,]  0.000000000  0.0000000000  0.0000000000  0.000000000  0.00000000
##  [2,] -0.085166388  0.0233951652  0.0803469226  0.020032720 -0.06579868
##  [3,] -0.091470770 -0.0626912265 -0.0404716628 -0.087131904  0.04586359
##  [4,]  0.295386267 -0.1887403847  0.1090399217  0.078636509  0.05493143
##  [5,] -0.320424404  0.0954683782  0.0514307970 -0.055664749 -0.06141728
##  [6,] -0.067965448 -0.5671409888 -0.1533100278 -0.060550323  0.04894095
##  [7,] -0.062986932 -0.1488503919 -0.1209736197  0.025340016  0.08919321
##  [8,]  0.305959463 -0.1656264424 -0.3113180829 -0.030357529 -0.06765720
##  [9,] -0.031206391 -0.0665361077  0.0909082807  0.011370215 -0.05440884
## [10,] -0.005344126 -0.4128415710 -0.0679842615 -0.003343218 -0.16629876
## [11,]  0.237604587 -0.1215052465  0.0513473866  0.061892530  0.15102818
## [12,]  0.022894912  0.1157725514 -0.0326291606  0.055905893 -0.01566915
## [13,]  0.104761575 -0.1540854325 -0.0152649274  0.054763464 -0.04650044
## [14,]  0.238260828 -0.0194544416  0.0032241761 -0.203849819 -0.06939201
## [15,]  0.120183411  0.1016137192  0.0200563819  0.024518065  0.00620927
## [16,] -0.002008415  0.0242880932  0.0104294921 -0.035543428  0.11933112
## [17,] -0.044399784  0.0510795322 -0.3444202878  0.233438228 -0.21784960
## [18,] -0.075151305  0.0534254839 -0.0695074780  0.268009863  0.14237836
## [19,]  0.079086573 -0.0248787527 -0.0995001547  0.012374799  0.16812420
## [20,]  0.232722574  0.1146401775 -0.0002803059  0.580332297  0.24954546
## [21,]  0.036767803 -0.0402536635  0.1919757885  0.059256708 -0.01211154
## [22,]  0.107186574  0.0011083087  0.2186491951  0.252875872 -0.13240395
## [23,]  0.083262525  0.0939655651 -0.0085911459 -0.347604081 -0.08172804
## [24,]  0.046100576 -0.1865722399  0.3397394241  0.252830083  0.14136022
## [25,]  0.174338442  0.1604333198 -0.2943474960  0.057244609 -0.29628578
## [26,]  0.278896818  0.2159091099 -0.0930967387 -0.203607120  0.44405989
## [27,] -0.099833756 -0.0718521997  0.1507955913  0.053976544  0.06032584
## [28,]  0.261104214  0.0011023622  0.4761483932 -0.074195234 -0.21454770
## [29,]  0.003448137  0.2139633901 -0.2190272385  0.242454349  0.05602015
## [30,]  0.292826804  0.2104928161  0.1651346180 -0.080613824 -0.31501183
## [31,] -0.054265660  0.0113609572 -0.1447697706  0.167817814 -0.34337400
## [32,] -0.246678246  0.3191348235  0.0865882886 -0.091061862  0.10772359
## [33,]  0.261620923  0.0008748017 -0.1887409410 -0.229647982  0.26099304
## [34,]  0.240482066  0.0860858764 -0.0858544578  0.029694327 -0.24427812
##             [,16]        [,17]         [,18]        [,19]        [,20]
##  [1,]  0.00000000  0.000000000  0.0000000000  0.000000000  0.000000000
##  [2,] -0.04403487  0.082724599 -0.0333704417 -0.060271923  0.061426566
##  [3,]  0.02623884  0.255880432  0.0505548479 -0.041988439  0.066878073
##  [4,] -0.02834791  0.110230383 -0.1312790638  0.038451790 -0.092337903
##  [5,]  0.05574049  0.101224821 -0.0129759670 -0.040130859 -0.276055192
##  [6,] -0.04257826  0.094707542 -0.1411110354 -0.039643271 -0.044254067
##  [7,] -0.09057878  0.058734118 -0.1040147590  0.066102923  0.133580439
##  [8,]  0.02649476  0.047451422  0.0587118305  0.178330523  0.194361208
##  [9,]  0.09520011 -0.139591444 -0.0747261987  0.180142030 -0.028514656
## [10,]  0.06840047  0.007692870 -0.1558086355 -0.080796110 -0.189065817
## [11,] -0.11451248 -0.061653799 -0.0083043214  0.114267610  0.064726882
## [12,] -0.03606755 -0.020243087 -0.1027278317  0.050970625  0.057308211
## [13,] -0.03963518 -0.033443921  0.0093688932  0.007872011 -0.073332657
## [14,]  0.26489368  0.198115815 -0.2751208853  0.016729867 -0.155104390
## [15,] -0.01147930  0.082851889  0.0149295283 -0.069341009 -0.013553623
## [16,]  0.04638147  0.113892636  0.3594238589 -0.208606729 -0.283738804
## [17,] -0.50829929  0.088358024  0.2293140014  0.057003809 -0.168195684
## [18,]  0.19573977  0.232585871 -0.1485726393 -0.557010319  0.339336461
## [19,]  0.14717296  0.143192785  0.1683115407 -0.082140422  0.078476813
## [20,]  0.17162319 -0.239052299 -0.2771556580 -0.080586834 -0.312408145
## [21,] -0.11614997 -0.035354089  0.2633047339  0.085218168  0.153733912
## [22,] -0.24577892  0.040423837 -0.1418360393  0.092819272 -0.018796967
## [23,] -0.20916577 -0.101735154 -0.4749325060 -0.017659234  0.086592956
## [24,] -0.06104498 -0.020465219  0.2052041226  0.185593385  0.260014699
## [25,]  0.39432720 -0.064016274  0.1151726107  0.258852031  0.288773830
## [26,] -0.35966126 -0.009672119 -0.1080677638  0.008325749  0.175541829
## [27,]  0.10049297 -0.196077453 -0.0371812336  0.298150149 -0.186808622
## [28,] -0.13227639  0.358759607  0.0473239558 -0.176054574 -0.018242930
## [29,] -0.02724297  0.463218376 -0.1054599007  0.225122335 -0.083038919
## [30,]  0.14355725 -0.194862159  0.1091144321 -0.160861546  0.008079303
## [31,] -0.27290084 -0.332368524 -0.1134269795 -0.353882397  0.091843685
## [32,] -0.03022161  0.036728041 -0.1543288088  0.197418300 -0.094457675
## [33,] -0.01486881 -0.226980569  0.2718155395 -0.201827092 -0.317516343
## [34,] -0.04456938  0.257332884 -0.0006988779  0.068013769 -0.272806467
##             [,21]         [,22]        [,23]        [,24]        [,25]
##  [1,]  0.00000000  0.0000000000  0.000000000  0.000000000  0.000000000
##  [2,]  0.16929816  0.0365795229  0.075791473  0.107300343 -0.022391071
##  [3,]  0.12576922  0.0113549102  0.018302162 -0.437817892 -0.076679305
##  [4,]  0.18016863  0.0612590259 -0.368174306 -0.389102868  0.112047768
##  [5,]  0.07653175 -0.0776431725 -0.135466750  0.407444862 -0.027351354
##  [6,]  0.02435475 -0.0912399645 -0.158405758  0.187233643 -0.051665170
##  [7,]  0.12710171 -0.3364721465  0.171152105 -0.025854483 -0.156537166
##  [8,] -0.02417595  0.3477239483  0.363174354  0.135997048 -0.078441483
##  [9,] -0.21475582  0.0074058897 -0.255908155 -0.245800317  0.052099900
## [10,]  0.15020917  0.0941838671  0.012756469  0.241238847 -0.054468153
## [11,]  0.16487760 -0.1129604495 -0.021886300  0.071549246 -0.023755560
## [12,]  0.01557947  0.0004866872 -0.090555114  0.080637422 -0.014535331
## [13,]  0.03766797 -0.1382521831 -0.039086214  0.081393592 -0.019943970
## [14,] -0.31381425  0.0923796879  0.290507888 -0.010249354 -0.208935933
## [15,]  0.05885774  0.0868090468 -0.012818443  0.015434045 -0.058469847
## [16,] -0.22401596  0.2628665804  0.039130255  0.052475838  0.119786404
## [17,] -0.07895679  0.1589586983 -0.131518118  0.051495214  0.003769359
## [18,]  0.02324184  0.0553817397  0.003322629  0.141960236 -0.017164978
## [19,]  0.12308635  0.3619254321 -0.330732691  0.017492321 -0.091435567
## [20,] -0.10434270 -0.0956544933  0.053601596  0.080454534  0.106834015
## [21,]  0.01256548 -0.2866161295  0.246189086  0.135592385  0.024554989
## [22,]  0.29077722  0.1508013809  0.274389926 -0.080559925 -0.013285711
## [23,]  0.09148142  0.1448409168 -0.208506761  0.222301535  0.290450446
## [24,] -0.11433363  0.1066413644 -0.251315531  0.299452022 -0.125941077
## [25,]  0.04797871 -0.0955572695 -0.130368050  0.151506779  0.395791590
## [26,] -0.25075168  0.0078313239 -0.067871412  0.124941845 -0.155020741
## [27,]  0.01768661  0.4170947759  0.125057950  0.054444681 -0.031152457
## [28,] -0.04236678  0.0168721027  0.091382869  0.098703501  0.398739333
## [29,]  0.28044771  0.0109660631  0.010978897  0.007402113  0.008672042
## [30,]  0.30843592  0.0164216932 -0.166859909  0.064671270 -0.564691249
## [31,] -0.10882333  0.1358545542  0.038852611 -0.143951171 -0.013726752
## [32,]  0.18772471  0.0974117845  0.006435964  0.089872921 -0.095562251
## [33,]  0.38426483 -0.1142725854  0.095251616  0.042135534  0.196760945
## [34,] -0.27466245 -0.2996310666 -0.188438476  0.074706396 -0.223597700
##               [,26]       [,27]        [,28]         [,29]        [,30]
##  [1,]  0.0000000000  0.00000000  0.000000000  0.0000000000  0.000000000
##  [2,] -0.0933168728  0.09698469 -0.207102211  0.1431773058  0.087034815
##  [3,] -0.0004775527  0.27726690 -0.231477708 -0.0348039568 -0.032631486
##  [4,] -0.1488145786 -0.10463820 -0.087373732 -0.2888477831 -0.086388137
##  [5,]  0.0234569739 -0.04042486 -0.133530767  0.0525550295  0.261635701
##  [6,] -0.0168774354 -0.13795850 -0.074467647 -0.0337650709 -0.044556665
##  [7,]  0.0338809313  0.10523848 -0.334572798  0.1139323170 -0.400128163
##  [8,] -0.2257849142  0.29344582  0.111647846  0.0210442552  0.162521657
##  [9,]  0.0270737452 -0.03407468  0.193222473  0.2395042769  0.032326811
## [10,] -0.0445372386 -0.01856765 -0.102659433  0.0550207295 -0.135534846
## [11,] -0.0434804363 -0.08475536  0.141378788 -0.1899756317  0.058193083
## [12,] -0.0377805605 -0.02744337  0.063207422 -0.0555513879 -0.091924374
## [13,] -0.0218316434 -0.05244342 -0.023447416  0.1338779297 -0.015775767
## [14,] -0.0156363318 -0.20669133  0.112653986  0.0592096527 -0.147867455
## [15,] -0.0248269735 -0.04000226  0.003502137 -0.0502509437 -0.137097039
## [16,]  0.2052357606 -0.12295116 -0.316023369 -0.1402555897 -0.235821887
## [17,]  0.0467251402  0.19030940  0.118341111  0.0346305457 -0.192663991
## [18,]  0.1202228771  0.05355515  0.226774840 -0.3487863374 -0.055509559
## [19,]  0.0603234926 -0.20300488  0.186516824  0.4937964156 -0.242308928
## [20,] -0.0832614491  0.19799389 -0.104187775  0.2397031196 -0.080166879
## [21,] -0.0137972304 -0.43491568  0.250871640 -0.0003351395 -0.277478361
## [22,]  0.5897226905 -0.02711922  0.008781913  0.0614608043 -0.036484534
## [23,]  0.2213175727  0.09132579  0.117326786 -0.0142472082 -0.085496429
## [24,] -0.1134289791  0.17977540 -0.038769443 -0.0974323855  0.054429473
## [25,]  0.0971246308 -0.07220104 -0.308645005 -0.0947283686 -0.180608435
## [26,]  0.0477431812 -0.15632828 -0.368107556  0.0385857517  0.078424479
## [27,]  0.0409884452 -0.14143280 -0.146955340 -0.3833414139 -0.006123818
## [28,] -0.2867935965  0.09366380 -0.111967167  0.1595260331 -0.016123894
## [29,] -0.1534011291 -0.38886988 -0.036178680  0.0367835837  0.325917761
## [30,]  0.0190349271  0.02011845 -0.153449661  0.0336761022  0.021400905
## [31,] -0.3495627870 -0.34595050 -0.143038997 -0.0622339343  0.012541488
## [32,] -0.4167182163  0.11679482  0.115985498 -0.1145363449 -0.504984059
## [33,] -0.0664802386  0.06096201  0.169393750 -0.0931890601  0.050359501
## [34,]  0.0993285663  0.12707445  0.146335748 -0.2927396048 -0.042211407
##              [,31]       [,32]        [,33]         [,34]
##  [1,]  0.651296562  0.00000000  0.000000000  0.0000000000
##  [2,] -0.070109185  0.15764093  0.093059479  0.2258279763
##  [3,]  0.225000201 -0.05740939 -0.073432752 -0.0775466497
##  [4,] -0.025764094  0.02612722 -0.311300738  0.0568334042
##  [5,]  0.096276012  0.05232596 -0.590914052  0.2323897560
##  [6,] -0.142457661 -0.09220735  0.333428012  0.1007904479
##  [7,]  0.021834167 -0.19384804 -0.127244418  0.3051650186
##  [8,]  0.127445792  0.16599446 -0.145728973  0.0536496859
##  [9,] -0.097958479  0.32727358  0.044351960  0.2832015102
## [10,] -0.050646707  0.33296669 -0.031334215 -0.4287961063
## [11,]  0.160669878 -0.01847368 -0.283044293 -0.1436456540
## [12,] -0.157097209 -0.16600151 -0.098999596  0.0159159076
## [13,]  0.150863570  0.12052991  0.007837372  0.0373265337
## [14,] -0.038204723 -0.25680494 -0.110876783  0.2852080440
## [15,]  0.050917955  0.10383261  0.087017758  0.0929988569
## [16,]  0.240056528  0.07853062  0.159148288  0.0153738192
## [17,] -0.189096635 -0.27760088 -0.123674280 -0.0393176129
## [18,] -0.120672486  0.07211858 -0.067131708  0.0615985620
## [19,]  0.050321263 -0.01491584 -0.151743250  0.0296537932
## [20,]  0.086436246 -0.11127830  0.022780834 -0.1153217146
## [21,]  0.115068409 -0.01906276 -0.091663585 -0.1428723067
## [22,] -0.047077253  0.28257045  0.001702725  0.1986630133
## [23,]  0.302618868 -0.22526714  0.135251363  0.0013892147
## [24,]  0.141406281 -0.08455361  0.179608872  0.3125458536
## [25,] -0.074251755  0.09229777 -0.035886404  0.0615998712
## [26,] -0.177017887  0.24949327 -0.086673289 -0.1099772525
## [27,] -0.142002826 -0.20189467 -0.050841660  0.0089614469
## [28,] -0.167013296 -0.08398920 -0.014602063 -0.0327534765
## [29,]  0.087043362 -0.09702597  0.311602500  0.0003707925
## [30,] -0.048701592 -0.17747829  0.119373514 -0.1089284991
## [31,]  0.156404402  0.08999960 -0.020338660  0.2389375219
## [32,] -0.003389807  0.30219098  0.102335167  0.0216692787
## [33,] -0.101788985  0.02712896  0.097247062  0.3664431142
## [34,]  0.095853159  0.24265272  0.086870966  0.0719542285
pos_idx <- which(values > 0)
k <- 2 
lambda <- diag( sqrt(values[pos_idx][1:k]) )
vec <- vectors[, pos_idx][, 1:k]
lambda
##          [,1]     [,2]
## [1,] 5092.474    0.000
## [2,]    0.000 1580.164
vec
##               [,1]         [,2]
##  [1,] -0.029001990 -0.097207596
##  [2,] -0.249606787 -0.299167050
##  [3,]  0.030777060 -0.036672471
##  [4,] -0.033858105 -0.113259566
##  [5,]  0.048325010 -0.018036064
##  [6,] -0.010843738 -0.115721509
##  [7,]  0.094596489  0.027402873
##  [8,] -0.028185268 -0.063760406
##  [9,]  0.144396905  0.164782342
## [10,]  0.125673902  0.134019682
## [11,]  0.104629195  0.350442915
## [12,] -0.502938666  0.332943203
## [13,] -0.465838349  0.239869480
## [14,]  0.090799496  0.170815335
## [15,] -0.515330501 -0.051199764
## [16,]  0.021642007  0.290784490
## [17,]  0.080195520  0.042695115
## [18,]  0.071629432  0.013051856
## [19,]  0.006358853 -0.236653739
## [20,]  0.039513559 -0.143393479
## [21,]  0.018991001 -0.293204584
## [22,]  0.073101646  0.066908844
## [23,]  0.047951572 -0.069153327
## [24,]  0.146080654  0.136881070
## [25,]  0.073826773  0.009345708
## [26,]  0.056668507 -0.073203783
## [27,] -0.084781365 -0.308789104
## [28,]  0.069966740 -0.005377223
## [29,]  0.128714184  0.118825179
## [30,]  0.125551677  0.055458786
## [31,]  0.097671301 -0.006440417
## [32,]  0.125759620  0.097808161
## [33,]  0.099010718 -0.011958633
## [34,] -0.001447051 -0.308836321
  1. Membentuk koordinat objek berdasarkan vektor eigen
# membentuk koordinat MDS
X <- vec %*% lambda
colnames(X) <- c("Dim1", "Dim2")
mds_coords <- as.data.frame(X)
mds_coords$Label <- labels
mds_coords
##            Dim1        Dim2 Label
## 1   -147.691888 -153.603986     1
## 2  -1271.116154 -472.733132     2
## 3    156.731386  -57.948535     3
## 4   -172.421530 -178.968738     4
## 5    246.093875  -28.499947     5
## 6    -55.221456 -182.859013     6
## 7    481.730191   43.301045     7
## 8   -143.532755 -100.751927     8
## 9    735.337530  260.383196     9
## 10   639.991119  211.773134    10
## 11   532.821487  553.757430    11
## 12 -2561.202239  526.105007    12
## 13 -2372.269827  379.033220    13
## 14   462.394100  269.916316    14
## 15 -2624.307343  -80.904046    15
## 16   110.211366  459.487309    16
## 17   408.393627   67.465302    17
## 18   364.771043   20.624079    18
## 19    32.382296 -373.951821    19
## 20   201.221782 -226.585275    20
## 21    96.711185 -463.311456    21
## 22   372.268254  105.726975    22
## 23   244.192147 -109.273627    23
## 24   743.911978  216.294598    24
## 25   375.960947   14.767755    25
## 26   288.582916 -115.674015    26
## 27  -431.746925 -487.937559    27
## 28   356.303826   -8.496896    28
## 29   655.473675  187.763321    29
## 30   639.368689   87.634002    30
## 31   497.388592  -10.176917    31
## 32   640.427637  154.552977    32
## 33   504.209537  -18.896606    33
## 34    -7.369069 -488.012171    34
  1. Menghitung matrik D yang merupakan jarak euclidean dari koordinat yang terbentuk
# menghitung jarak euclidean dari koordinat
D_hat <- dist(mds_coords[,1:2])
as.matrix(D_hat)
##             1         2          3          4          5          6          7
## 1     0.00000 1167.8722  319.09794   35.42493  413.18065   96.98782  659.50265
## 2  1167.87221    0.0000 1486.87419 1137.28950 1580.90777 1249.97077 1827.22784
## 3   319.09794 1486.8742    0.00000  350.69578   94.08971  246.02161  340.40520
## 4    35.42493 1137.2895  350.69578    0.00000  444.74262  117.26462  690.88228
## 5   413.18065 1580.9078   94.08971  444.74262    0.00000  338.55229  246.33282
## 6    96.98782 1249.9708  246.02161  117.26462  338.55229    0.00000  582.63663
## 7   659.50265 1827.2278  340.40520  690.88228  246.33282  582.63663    0.00000
## 8    53.01546 1187.3560  303.29966   83.38124  396.26918  120.58383  641.64243
## 9   975.25706 2136.1919  660.39394 1008.49226  568.16620  906.33723  333.82831
## 10  868.30004 2029.9950  553.43450  901.49516  461.39592  799.40919  231.14793
## 11  981.55928 2075.5418  718.07239 1016.98346  649.02726  942.54883  513.00686
## 12 2507.39637 1631.5636 2779.97873 2490.66302 2861.55519 2604.33670 3080.99618
## 13 2287.45479 1392.1370 2566.47622 2269.51508 2649.88901 2384.20554 2873.67921
## 14  742.68052 1885.8913  448.24665  777.48870  368.56214  687.70005  227.43871
## 15 2477.68226 1408.7783 2781.13347 2453.84611 2870.87954 2571.10815 3108.51992
## 16  665.12783 1666.4635  519.52282  698.21736  506.55268  663.30748  557.88641
## 17  598.41685 1764.2470  281.18057  630.93263  188.54850  526.87874   77.21504
## 18  541.27043 1708.6627  222.38290  573.07343  128.44236  466.68948  119.13726
## 19  284.56964 1307.2360  339.58912  282.77732  406.21378  210.21627  613.19938
## 20  356.46461 1492.7718  174.40684  376.66518  203.10416  260.14442  389.26032
## 21  394.52703 1367.8598  409.78229  391.51398  459.75671  318.96254  636.31428
## 22  581.04311 1742.2194  270.63964  614.60443  184.21955  515.78031  126.01156
## 23  394.38341 1558.2882  101.40833  422.40308   80.79606  308.32339  282.31782
## 24  965.28877 2129.5769  648.06662  997.94800  554.74970  893.27367  314.11154
## 25  550.05576 1717.7078  230.97459  581.59880  136.88517  474.31488  109.55036
## 26  437.92053 1600.0476  143.93421  465.32926   96.97751  350.30739  250.15783
## 27  438.70970  839.5069  728.83282  403.37500  818.87183  484.60742 1056.71893
## 28  524.46901 1692.3389  205.60794  555.52781  112.01051  446.93982  135.70114
## 29  872.70073 2036.6649  555.98398  905.48488  462.99203  801.52884  225.95607
## 30  823.20114 1990.9705  504.11610  854.44741  410.06362  745.40052  163.75380
## 31  660.83292 1827.9954  343.99049  690.75052  251.96184  578.96198   55.72323
## 32  846.22284 2011.8369  528.31710  878.61283  434.74992  773.15879  193.80885
## 33  665.67375 1832.4161  349.66572  695.30762  258.29425  582.96373   66.13523
## 34  362.65594 1263.8394  460.30826  350.35719  524.78086  308.88234  722.15775
##             8          9         10        11        12        13        14
## 1    53.01546  975.25706  868.30004  981.5593 2507.3964 2287.4548  742.6805
## 2  1187.35603 2136.19192 2029.99503 2075.5418 1631.5636 1392.1370 1885.8913
## 3   303.29966  660.39394  553.43450  718.0724 2779.9787 2566.4762  448.2466
## 4    83.38124 1008.49226  901.49516 1016.9835 2490.6630 2269.5151  777.4887
## 5   396.26918  568.16620  461.39592  649.0273 2861.5552 2649.8890  368.5621
## 6   120.58383  906.33723  799.40919  942.5488 2604.3367 2384.2055  687.7001
## 7   641.64243  333.82831  231.14793  513.0069 3080.9962 2873.6792  227.4387
## 8     0.00000  950.17449  843.55295  941.1894 2497.6139 2279.7944  710.3114
## 9   950.17449    0.00000  107.02278  356.4845 3307.2319 3109.8716  273.1099
## 10  843.55295  107.02278    0.00000  358.3833 3216.5888 3016.9010  186.8725
## 11  941.18944  356.48449  358.38330    0.0000 3094.1473 2910.3409  292.4479
## 12 2497.61393 3307.23185 3216.58879 3094.1473    0.0000  239.4276 3034.4303
## 13 2279.79445 3109.87159 3016.90105 2910.3409  239.4276    0.0000 2836.7633
## 14  710.31141  273.10986  186.87250  292.4479 3034.4303 2836.7633    0.0000
## 15 2480.85398 3376.93510 3277.39292 3220.2884  610.2805  524.4666 3106.5738
## 16  615.02364  656.06796  584.83237  432.9967 2672.2441 2483.7846  399.9623
## 17  576.99200  379.61774  272.87753  501.9585 3004.8045 2798.0643  209.5291
## 18  522.59438  441.36601  335.08813  558.9921 2969.3148 2760.4075  267.7254
## 19  324.93736  946.85108  843.95628 1054.0796 2745.3202 2519.7893  774.2586
## 20  367.00098  722.78484  620.22304  847.8756 2863.1327 2643.7914  561.0034
## 21  434.93283  965.18266  866.54041 1106.6261 2836.0974 2608.7184  819.3577
## 22  555.59357  394.63635  287.96062  475.9292 2963.4383 2758.1127  187.2987
## 23  387.81854  614.71128  509.63502  723.1301 2876.4464 2661.6380  437.4895
## 24  942.37819   44.91465  104.01917  398.0457 3319.6028 3120.4283  286.5791
## 25  532.18277  435.29125  329.42837  561.3511 2981.3409 2772.2665  269.3909
## 26  432.37324  583.95951  480.32214  712.5945 2921.1566 2706.4502  422.9542
## 27  482.68014 1386.38742 1279.92870 1419.6903 2358.5721 2125.3864 1172.1052
## 28  508.27906  464.71825  359.16203  589.3118 2966.0817 2755.9561  297.9414
## 29  849.50122  107.94388   28.56888  385.9990 3234.4210 3033.7790  209.8305
## 30  805.24774  197.61655  124.14069  478.1457 3230.4661 3025.7032  254.0607
## 31  647.28974  360.30886  263.81301  565.0464 3105.2498 2895.9323  282.2709
## 32  824.48438  142.15457   57.22182  413.4529 3223.1172 3021.0491  212.1430
## 33  652.89384  362.51532  267.66615  573.3684 3113.4830 2903.8736  291.8243
## 34  410.50097 1054.37598  953.29675 1173.4947 2747.8169 2518.8337  891.7023
##           15        16         17         18        19        20        21
## 1  2477.6823  665.1278  598.41685  541.27043  284.5696  356.4646  394.5270
## 2  1408.7783 1666.4635 1764.24699 1708.66271 1307.2360 1492.7718 1367.8598
## 3  2781.1335  519.5228  281.18057  222.38290  339.5891  174.4068  409.7823
## 4  2453.8461  698.2174  630.93263  573.07343  282.7773  376.6652  391.5140
## 5  2870.8795  506.5527  188.54850  128.44236  406.2138  203.1042  459.7567
## 6  2571.1081  663.3075  526.87874  466.68948  210.2163  260.1444  318.9625
## 7  3108.5199  557.8864   77.21504  119.13726  613.1994  389.2603  636.3143
## 8  2480.8540  615.0236  576.99200  522.59438  324.9374  367.0010  434.9328
## 9  3376.9351  656.0680  379.61774  441.36601  946.8511  722.7848  965.1827
## 10 3277.3929  584.8324  272.87753  335.08813  843.9563  620.2230  866.5404
## 11 3220.2884  432.9967  501.95849  558.99206 1054.0796  847.8756 1106.6261
## 12  610.2805 2672.2441 3004.80448 2969.31484 2745.3202 2863.1327 2836.0974
## 13  524.4666 2483.7846 2798.06430 2760.40755 2519.7893 2643.7914 2608.7184
## 14 3106.5738  399.9623  209.52915  267.72538  774.2586  561.0034  819.3577
## 15    0.0000 2787.4030 3036.32815 2990.80216 2672.8032 2829.2822 2747.7586
## 16 2787.4030    0.0000  492.53824  507.34758  837.0652  692.0827  922.8975
## 17 3036.3281  492.5382    0.00000   64.00805  579.8565  359.7025  615.5241
## 18 2990.8022  507.3476   64.00805    0.00000  515.9190  296.4133  553.2176
## 19 2672.8032  837.0652  579.85653  515.91901    0.0000  224.1064  110.1061
## 20 2829.2822  692.0827  359.70254  296.41327  224.1064    0.0000  258.7697
## 21 2747.7586  922.8975  615.52409  553.21758  110.1061  258.7697    0.0000
## 22 3002.3818  440.2501   52.62127   85.43250  587.8896  373.7490  632.2471
## 23 2868.6398  584.3285  241.24422  177.23624  338.9955  124.9339  383.5276
## 24 3381.3057  678.7630  367.04594  426.65537  924.4811  700.4679  938.4739
## 25 3001.7933  518.0717   61.87819   12.62975  518.7959  297.9682  553.6607
## 26 2913.0978  602.1852  218.84839  156.14673  363.7941  141.1853  397.0725
## 27 2230.0219 1091.4819 1007.12883  945.02688  477.9212  684.8025  529.0316
## 28 2981.4905  528.7445   92.10648   30.32697  488.3467  267.6060  523.6837
## 29 3290.7667  609.2166  274.80932  335.32603  838.9081  614.8411  857.9708
## 30 3268.0248  646.7475  231.85395  282.65562  762.5575  539.1720  773.3163
## 31 3122.4971  608.6795  118.10342  136.14740  590.3923  366.8070  604.8746
## 32 3273.2147  611.6488  247.83875  306.46942  805.6280  581.5223  823.0334
## 33 3129.1313  619.7465  128.99251  144.93094  590.4957  367.3366  602.9589
## 34 2648.4152  954.7672  693.83992  630.23733  120.7888  334.4461  106.9711
##            22         23         24         25         26        27         28
## 1   581.04311  394.38341  965.28877  550.05576  437.92053  438.7097  524.46901
## 2  1742.21939 1558.28818 2129.57686 1717.70780 1600.04762  839.5069 1692.33894
## 3   270.63964  101.40833  648.06662  230.97459  143.93421  728.8328  205.60794
## 4   614.60443  422.40308  997.94800  581.59880  465.32926  403.3750  555.52781
## 5   184.21955   80.79606  554.74970  136.88517   96.97751  818.8718  112.01051
## 6   515.78031  308.32339  893.27367  474.31488  350.30739  484.6074  446.93982
## 7   126.01156  282.31782  314.11154  109.55036  250.15783 1056.7189  135.70114
## 8   555.59357  387.81854  942.37819  532.18277  432.37324  482.6801  508.27906
## 9   394.63635  614.71128   44.91465  435.29125  583.95951 1386.3874  464.71825
## 10  287.96062  509.63502  104.01917  329.42837  480.32214 1279.9287  359.16203
## 11  475.92923  723.13006  398.04567  561.35114  712.59451 1419.6903  589.31181
## 12 2963.43835 2876.44636 3319.60276 2981.34087 2921.15658 2358.5721 2966.08173
## 13 2758.11268 2661.63800 3120.42832 2772.26653 2706.45018 2125.3864 2755.95605
## 14  187.29871  437.48955  286.57914  269.39094  422.95417 1172.1052  297.94138
## 15 3002.38180 2868.63977 3381.30573 3001.79328 2913.09777 2230.0219 2981.49052
## 16  440.25014  584.32855  678.76296  518.07173  602.18515 1091.4819  528.74447
## 17   52.62127  241.24422  367.04594   61.87819  218.84839 1007.1288   92.10648
## 18   85.43250  177.23624  426.65537   12.62975  156.14673  945.0269   30.32697
## 19  587.88963  338.99552  924.48111  518.79591  363.79415  477.9212  488.34666
## 20  373.74902  124.93388  700.46787  297.96822  141.18525  684.8025  267.60602
## 21  632.24713  383.52760  938.47390  553.66069  397.07248  529.0316  523.68370
## 22    0.00000  250.25736  387.74251   91.03415  236.68890  999.4388  115.33410
## 23  250.25736    0.00000  596.41812  180.96762   44.84981  774.7774  150.74806
## 24  387.74251  596.41812    0.00000  419.52477  563.49598 1370.4440  448.07510
## 25   91.03415  180.96762  419.52477    0.00000  157.00311  951.3699   30.45729
## 26  236.68890   44.84981  563.49598  157.00311    0.00000  810.8361  126.77956
## 27  999.43884  774.77739 1370.44401  951.36988  810.83613    0.0000  922.43555
## 28  115.33410  150.74806  448.07510   30.45729  126.77956  922.4355    0.00000
## 29  294.84788  507.32972   92.92668  328.71695  476.11243 1280.0861  357.79976
## 30  267.71253  441.51683  165.77952  273.30044  405.44396 1215.9652  298.94291
## 31  170.55442  271.89814  334.75831  123.96334  233.94326 1044.7718  141.09477
## 32  272.56822  476.03260  120.50326  299.13632  443.64100 1249.9410  327.58449
## 33  181.49253  275.27631  335.81567  132.59333  236.34870 1046.9068  148.27088
## 34  704.73447  454.67123 1029.79184  632.24169  475.62935  424.3779  601.82462
##            29         30         31         32         33        34
## 1   872.70073  823.20114  660.83292  846.22284  665.67375  362.6559
## 2  2036.66490 1990.97053 1827.99543 2011.83685 1832.41614 1263.8394
## 3   555.98398  504.11610  343.99049  528.31710  349.66572  460.3083
## 4   905.48488  854.44741  690.75052  878.61283  695.30762  350.3572
## 5   462.99203  410.06362  251.96184  434.74992  258.29425  524.7809
## 6   801.52884  745.40052  578.96198  773.15879  582.96373  308.8823
## 7   225.95607  163.75380   55.72323  193.80885   66.13523  722.1578
## 8   849.50122  805.24774  647.28974  824.48438  652.89384  410.5010
## 9   107.94388  197.61655  360.30886  142.15457  362.51532 1054.3760
## 10   28.56888  124.14069  263.81301   57.22182  267.66615  953.2967
## 11  385.99902  478.14575  565.04640  413.45287  573.36837 1173.4947
## 12 3234.42097 3230.46608 3105.24978 3223.11725 3113.48296 2747.8169
## 13 3033.77898 3025.70323 2895.93232 3021.04905 2903.87356 2518.8337
## 14  209.83050  254.06072  282.27085  212.14297  291.82432  891.7023
## 15 3290.76673 3268.02483 3122.49705 3273.21470 3129.13132 2648.4152
## 16  609.21664  646.74752  608.67946  611.64879  619.74650  954.7672
## 17  274.80932  231.85395  118.10342  247.83875  128.99251  693.8399
## 18  335.32603  282.65562  136.14740  306.46942  144.93094  630.2373
## 19  838.90808  762.55751  590.39227  805.62799  590.49568  120.7888
## 20  614.84107  539.17202  366.80697  581.52227  367.33658  334.4461
## 21  857.97080  773.31628  604.87461  823.03344  602.95893  106.9711
## 22  294.84788  267.71253  170.55442  272.56822  181.49253  704.7345
## 23  507.32972  441.51683  271.89814  476.03260  275.27631  454.6712
## 24   92.92668  165.77952  334.75831  120.50326  335.81567 1029.7918
## 25  328.71695  273.30044  123.96334  299.13632  132.59333  632.2417
## 26  476.11243  405.44396  233.94326  443.64100  236.34870  475.6294
## 27 1280.08606 1215.96516 1044.77177 1249.94095 1046.90683  424.3779
## 28  357.79976  298.94291  141.09477  327.58449  148.27088  601.8246
## 29    0.00000  101.41623  253.32041   36.45971  256.10382  946.5902
## 30  101.41623    0.00000  172.41033   66.92735  172.09523  865.8165
## 31  253.32041  172.41033    0.00000  218.16532   11.07060  695.0589
## 32   36.45971   66.92735  218.16532    0.00000  220.54507  912.4311
## 33  256.10382  172.09523   11.07060  220.54507    0.00000  694.1052
## 34  946.59021  865.81652  695.05887  912.43112  694.10524    0.0000
  1. Validitas model dengan menghitung STRESS dan \(R^2\)
# menghiung stress
num <- sum((D - D_hat)^2)
den <- sum(D^2)
stress <- sqrt(num / den)
stress
## [1] 0.02528328
# menghitung R-Square
eig_pos <- values[values > 0]
R2 <- sum(eig_pos[1:2]) / sum(eig_pos)
R2
## [1] 0.9806235
  1. Visualisasi : plot hasil MDS
# plot MDS
ggplot(mds_coords, aes(x = Dim1, y = Dim2)) +
  geom_point(size = 3) +
  geom_text(aes(label = Label), vjust = -0.8) +
  theme_minimal() +
  labs(title = "Plot MDS (Manual)", x = "Dimensi 1", y = "Dimensi 2")

3.2 Interpretasi Hasil

Plot MDS dua dimensi yang dihasilkan menunjukkan posisi relatif dari seluruh sarana kesehatan berdasarkan kemiripan atau ketidakmiripan dalan data.

  1. Objek yang berdekatan
    Objek yang berdekatan menandakan bahwa objek tersebut memiliki karakteristik yang mirip. Terlihat bahwa sebagian besar objek berkumpul di satu cluster sebelah kanan atas. Hal ini menunjukkan bahwa sarana kesehatan memiliki profil sarana kesehatan yang sama baik dari segi rumah sakit, rumah sakit bersalin, dan lainnya.

  2. Dimensi 1
    Dimensi 1 (horizontal) menunjukkan variasi terbesar yaitu membedakan objek berdasarkan kapasitas fasilitas kesehatan. Objek yang jauh ke kanan memiliki skor yang tinggi sementara objek yang jauh kek kiri memiliki skor yang rendah.

  3. Dimensi 2
    Dimensi 2 (vertikal) menunjukkan variasi tambahan yaitu pemisahan objek berdasarkan pola lainnya yang tidak dijelaskan oleh dimensi 1. Titik yang tinggi ke atas memiliki skor besar dan titik yang jauh ke bawah memiliki skor rendah.

  4. Validitas Model
    Berdasarkan nilai stress yang diperoleh yaitu 0.0252 atau setara dengan 2.52%, dapat disimpulkan bahwa kriteria MDS sangat baik dan cukup representatif. Koefisien determinasi (\(R^2\)) yang cukup tinggi yaitu 0.9806 atau setara 98% menunjukkan bahwa variasi jarak antar objek dapat dijelaskan oleh dimensi 1 dan 2. Sehingga, dapat disimpulkan bahwa model MDS dapat dipercaya dan menangkap struktur data dengan sangat baik.

4. PENUTUP

4.1 Kesimpulan

Berdasarkan hasil yang sudah diperoleh dapat disimpulkan bahwa:

  1. Berdasarkan matriks jarak ketidaksamaan, dapat disimpulkan bahwa sebagian besar provinsi memiliki kemiripan yang cukup tinggi dalam ketersediaan sarana kesehatan. Namun, terdapat beberapa provinsi yang memiliki karakteristik yang berbeda dari mayoritas.

  2. MDS berhasil memetakan seluruh provinsi dalam ruang dua dimensi dengan stress rendah dan \(R^2\) tinggi, yang menunjukkan bahwa model MDS representatif dan dapat dipercaya.

  3. Berdasarkan plot MDS tersebut dapat diketahui visualisasi pola penyebaran ketersediaan fasilitas kesehatan di tiap provinsi. Secara keseluruhan, pemetaan ini membantu mengidentifikasi posisi relatif tiap provinsi dan memberikan gambaran mengenai disparitas sarana kesehatan antar wilayah di Indonesia.

4.2 Daftar Pustaka

Aswin, & Wahidun, A. (2016). ANALISIS ATRIBUT PRODUK SAMSUNG DAN ASUS MENGGUNAKAN METODE MULTIDIMENSIONAL SCALING (MDS) DI BANDAR LAMPUNG. Jurnal Bisnis Darmajaya, 2(2), 68.

Kuswandari, R., Arofah, I., & Setiawan, T. H. (2021). ANALISIS POSITIONING MEREK LIPSTIK BERDASARKAN PERSEPSI KONSUMEN DENGAN MENGGUNAKAN METODE MULTIDIMENSIONAL SCALING. Jurnal Syntax Admiration, 2(5), 893-894.

Mahida, M. (2020). Pendekatan Multidimensional Scaling untuk Penilaian Status Keberlanjutan ATCS Kota Pintar Semarang. Warta Penelitian Perhubungan, 32(2), 106-108.

Pradita, D., Satyahadewi, N., & Perdana, H. (2019). ANALISIS PERBANDINGAN METODE MULTIDIMENSIONAL SCALING (MDS) DAN WEIGHTED MULTIDIMENSIONAL SCALING (WMDS). Buletin Ilmiah Mat. Stat. dan Terapannya, 8(1), 149.