The ahp.cr function calculates the consistency ratio of each decision-maker, defined by the following equation:
$$CR = (\lambda-n)/((n-1)(RI))$$
Where \(\lambda\) is the maximum eigenvalue of the pairwise comparison matrix, \(n\) is the number of attributes, and RI is the random index. Following Saaty and Tran (2007) , the RI is a function of \(n\) and is the consistency ratio of randomly generated pairwise comparison matrices.
Arguments
- ahpmat
A list of pairwise comparison matrices of each decision maker generated by
ahp.mat.- atts
a list of attributes in the correct order. The RI is asymptotic as it approaches n=15, thus it is set to be equal to 1.6 if the number of attributes exceeds 16.
- ri
A user-supplied random index value, probably user generated using
ahp.ri.
References
Saaty TL, Tran LT (2007). “On the invalidity of fuzzifying numerical judgments in the Analytic Hierarchy Process.” Mathematical and Computer Modelling, 46(7), 962 - 975. ISSN 0895-7177. Decision Making with the Analytic Hierarchy Process and the Analytic Network Process, http://www.sciencedirect.com/science/article/pii/S0895717707000787.
Examples
data(city200)
atts <- c('cult', 'fam', 'house', 'jobs', 'trans')
cityahp <- ahp.mat(df = city200, atts = atts, negconvert = TRUE)
ahp.cr(cityahp, atts)
#> [1] 0.061358609 0.029678314 0.063388311 0.093246803 0.106226128 0.107590264
#> [7] 0.213740701 0.061735365 0.038342589 0.119328991 0.136351544 0.238768605
#> [13] 0.036267286 0.038479583 0.070583192 0.090951139 0.121043385 0.058082463
#> [19] 0.092924026 0.064562823 0.071010525 0.071528763 0.209664724 0.122468650
#> [25] 0.203722340 0.110459779 0.100961643 0.044414042 0.160878654 0.183139506
#> [31] 0.187920116 0.083195119 0.075105744 0.020024629 0.147699219 0.070009799
#> [37] 0.095982691 0.046376412 0.026248174 0.031794763 0.133082581 0.101034537
#> [43] 0.046670677 0.249488508 0.104985409 0.055496664 0.031937753 0.074873282
#> [49] 0.103260200 0.076104146 0.048427116 0.046627168 0.099756391 0.080913909
#> [55] 0.085876718 0.061202622 0.084693426 0.088407306 0.077458293 0.150118275
#> [61] 0.042794076 0.154374565 0.067671611 0.064144942 0.081833743 0.090600905
#> [67] 0.127877729 0.095472359 0.132920109 0.084074539 0.063177885 0.023985432
#> [73] 0.106478426 0.128437131 0.036202974 0.109946172 0.129504947 0.065569152
#> [79] 0.085181531 0.053589390 0.032549198 0.185076362 0.071260192 0.096470970
#> [85] 0.115944371 0.103167626 0.101429657 0.071065777 0.053085253 0.036446340
#> [91] 0.174606380 0.062995871 0.110471976 0.023703938 0.014622927 0.085630588
#> [97] 0.071560167 0.086371831 0.140525102 0.027868104 0.040489841 0.214584332
#> [103] 0.044968979 0.062997297 0.030668122 0.152704219 0.061978192 0.102864005
#> [109] 0.140165677 0.089837749 0.030392370 0.138176938 0.141249309 0.100190603
#> [115] 0.066011018 0.049769588 0.113028067 0.096285868 0.023598140 0.203951002
#> [121] 0.102585844 0.204550024 0.081104221 0.091503408 0.093269855 0.069839141
#> [127] 0.020727243 0.127905282 0.109256095 0.068719518 0.085070912 0.065217202
#> [133] 0.136100693 0.077847351 0.149039703 0.054165766 0.083963700 0.078320927
#> [139] 0.058875241 0.043441284 0.051225578 0.117968695 0.069091380 0.092829337
#> [145] 0.075489686 0.128741471 0.074138920 0.056409399 0.035514671 0.031181248
#> [151] 0.142198316 0.071939979 0.121915940 0.079885565 0.007117328 0.125677233
#> [157] 0.120983633 0.076771591 0.191203442 0.084468776 0.060460902 0.068056947
#> [163] 0.018715021 0.070575291 0.114073223 0.068581958 0.114354171 0.033638029
#> [169] 0.106907328 0.082124824 0.065041399 0.095311844 0.127352181 0.062383927
#> [175] 0.036060488 0.079030701 0.108177368 0.092514654 0.091923572 0.246777618
#> [181] 0.045655826 0.193581744 0.041684100 0.054918206 0.069896336 0.082702333
#> [187] 0.093036914 0.174088313 0.048705520 0.075349801 0.057726951 0.168387107
#> [193] 0.103865249 0.153580644 0.069896228 0.057037055 0.057822722 0.042254453
#> [199] 0.123320565 0.062652221