Description Usage Arguments Value Examples
Implementation based on https://doi.org/10.1016/j.omega.2015.12.001. Calculates weights of the criteria using a linear model. Steps: 1. Build model (consists of validating model and constructing necessary constraints for LP problem). 2. Solve LP problem. 3. Calculate consistency ratio.
1 | calculateWeights(criteriaNames, bestToOthers, othersToWorst)
|
criteriaNames |
Names of the criteria |
bestToOthers |
Vector of pairwise comparisons. Best criterion should be 1, others <2, 9>. |
othersToWorst |
Vector of pairwise comparisons. Worst criterion should be 1, others <2, 9>. |
Result that consist of criteriaNames, criteriaWeights, consistencyRatio and a model that was used to calculate weights.
1 2 3 4 | criteriaNames <- c("quality", "price", "comfort", "safety", "style")
bestToOthers <- c(2, 1, 4, 2, 8)
othersToWorst <- c(4, 8, 2, 4, 1)
calculateWeights(criteriaNames, bestToOthers, othersToWorst)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.