Description Author(s) Examples

weight is a slot of ahpObj and ratingObj classes. It consists of computed AHP weights from a pairwise comparison matrix.

Daryanaz Dargahi <[email protected]>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
# ahp()
mat <- matrix(c(1,2,5, 1/2,1,3, 1/5,1/3,1), nrow = 3, ncol = 3, byrow = TRUE)
res <- ahp(mat, simulation = 500)
weight(res)
# rating()
mat <- matrix(nrow = 4, ncol = 4, data = NA)
## 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)
## 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)
weight(result)
``` |

```
[1] 0.5815521 0.3089956 0.1094523
priorities idealised_priorities
excellent 0.51275083 1.0000000
good 0.27549331 0.5372850
fair 0.13774666 0.2686425
poor 0.07400921 0.1443376
```

Prize documentation built on May 2, 2018, 3:13 a.m.

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.