apply.OPA | R Documentation |
This function applies the Ordinal Priority Approach (OPA) to determine the optimal weights for experts, criteria, and alternatives based on expert opinions, ranks, and criterion importance.
apply.OPA(expert.opinion.lst, expert.rank, criterion.rank.lst)
expert.opinion.lst |
A list of matrices where each matrix represents the rankings of alternatives for each criterion as assessed by a particular expert. Each row corresponds to an alternative, and each column corresponds to a criterion. |
expert.rank |
A numeric vector specifying the rank or weight of importance for each expert. |
criterion.rank.lst |
A list of numeric vectors where each vector represents the rank or weight of importance for the criteria as assessed by each expert. |
A list of matrices where each matrix represents the optimal weights for the alternatives and criteria for a specific expert.
# Input Data
expert.x.alt <- matrix(c(1, 3, 2, 2, 1, 3), nrow = 3)
colnames(expert.x.alt) <- c("c", "q")
rownames(expert.x.alt) <- c("alt1", "alt2", "alt3")
expert.y.alt <- matrix(c(1, 2, 3, 3, 1, 2), nrow = 3)
colnames(expert.y.alt) <- c("c", "q")
rownames(expert.y.alt) <- c("alt1", "alt2", "alt3")
expert.opinion.lst <- list(expert.x.alt, expert.y.alt)
expert.rank <- c(1, 2) # Ranks of experts
# Criterion ranks for each expert
criterion.x.rank <- c(1, 2)
criterion.y.rank <- c(2, 1) # Adjusted criterion rank for expert y
criterion.rank.lst <- list(criterion.x.rank, criterion.y.rank)
# Apply OPA
weights <- apply.OPA(expert.opinion.lst, expert.rank, criterion.rank.lst)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.