How to utilize Spearman Rho coefficient in R

The dataset below presents the ranking of different multicriteria methods. My idea is to generate a final ranking based on the multicriteria methods for all alternatives, but it can be seen that in some cases both methods presented the same results as is the case for the alternative with 2 clusters. For the alternative with 5 clusters, they presented different rankings. I spoke to an expert on this and he said the following: "My advice to you is this: Compare the MCDM ranking results you find statistically with a third party. In this sense, you can use the Spearman Rho coefficient".

Do you know how I can use this coefficient in R in this dataset below?

df1<-structure(list(nclusters = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
    12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25), Promethee = c(1L, 
    6L, 4L, 5L, 2L, 3L, 23L, 24L, 22L, 21L, 20L, 19L, 17L, 18L, 9L, 
    10L, 11L, 12L, 13L, 14L, 15L, 16L, 8L, 7L), WSM = c(1, 24, 20, 
    19, 18, 17, 23, 22, 21, 16, 15, 14, 13, 12, 7, 6, 5, 4, 11, 10, 
    9, 8, 3, 2), TOPSIS = c(1L, 24L, 20L, 21L, 18L, 19L, 22L, 23L, 
    17L, 16L, 15L, 14L, 12L, 13L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 
    3L, 2L), VIKOR = c(1L, 24L, 19L, 20L, 17L, 18L, 22L, 23L, 21L, 
    16L, 15L, 14L, 12L, 13L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 3L, 
    2L)), class = "data.frame", row.names = c(NA, -24L))

    > df1
       nclusters Promethee WSM TOPSIS VIKOR
    1          2         1   1      1     1
    2          3         6  24     24    24
    3          4         4  20     20    19
    4          5         5  19     21    20
    5          6         2  18     18    17
    6          7         3  17     19    18
    7          8        23  23     22    22
    8          9        24  22     23    23
    9         10        22  21     17    21
    10        11        21  16     16    16
    11        12        20  15     15    15
    12        13        19  14     14    14
    13        14        17  13     12    12
    14        15        18  12     13    13
    15        16         9   7      4     4
    16        17        10   6      5     5
    17        18        11   5      6     6
    18        19        12   4      7     7
    19        20        13  11      8     8
    20        21        14  10      9     9
    21        22        15   9     10    10
    22        23        16   8     11    11
    23        24         8   3      3     3
    24        25         7   2      2     2

cor(X,Y,method="spearman") where X and Y are your two ranked variables.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.