Description Usage Arguments Value Author(s) References Examples

Estimates idealised priorities of alternatives (the rating AHP model).

1 | ```
rating(scale, alternative, NA_category = NULL, simulation = 500)
``` |

`scale` |
a pairwise comparison matrix (PCM) of rating categories. |

`alternative` |
a N by 2 character matrix, where N is the number of alternatives. The matrix includes alternatives on column #1 and the rating category they belong to on column #2. |

`NA_category` |
a character string or vector which specifies categories with the value of zero. Since zero is not achievable by PCM matrix. |

`simulation` |
simulation size for computation of Saaty's inconsistency |

An S4 object including the raw and normalized ahp priorities, Satty's inconsistency, and rating matrix.

Daryanaz Dargahi

T.L. Saaty. Rank from comparisons and from ratings in the analytic hierarchy/network processes. European Journal of Operational Research, 168(2):557-570, January 2006.

T.L. Saaty. The Analytic Hierarchy Process, Planning, Piority Setting, Resource Allocation. McGraw-Hill, New york, 1980.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
mat <- matrix(nrow = 4, ncol = 4, data = NA)
# The category PCM matrix
rownames(mat) <- c('excellent','good','fair','poor')
colnames(mat) <- c('excellent','good','fair','poor')
mat[1,] <- c(1,2,4,6)
mat[2,] <- c(NA,1,2,4)
mat[3,] <- c(NA,NA,1,2)
mat[4,] <- c(NA,NA,NA,1)
# The alternative matrix
alt <- matrix(nrow = 5, ncol = 2, data = NA)
alt[,1] <- c("Andy", "Emily", "Nina", "Alex", "Jack")
alt[,2] <- c("good", "poor", "good", "fair", "excellent")
result <- rating(mat, alt, simulation = 500)
# Specifying a category with value of zero
alt <- rbind(alt, c('shannon', 'Not_available'))
result <- rating(mat, alt, NA_category = 'Not_available', simulation = 500)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.