topsis: TOPSIS - the Technique for Order of Preference by Similarity...

Description Usage Arguments Value Author(s) References Examples

View source: R/linear_ordering_methods.R

Description

TOPSIS - the Technique for Order of Preference by Similarity to Ideal Solution.

Usage

1
topsis(decision, weights, impacts)

Arguments

decision

A numeric matrix with m rows for m alternatives and n columns for n criterions.

weights

A numeric vector with length equal to number of columns in decision matrix for weights of criterions.

impacts

A character vector of '+' and '-' signs for the way that each criterion influences on the alternatives.

Value

A data frame including elements:

alt.row

Row number of alternatives in decision matrix.

score

Score of alternatives.

rank

Rank of alternatives based on score.

Should decision be a data frame, the row names will be carried over to the return value.

Author(s)

Antoni Baum antoni.baum@protonmail.com

References

Yoon, K. P., & Hwang, C. L. (1981). Multiple Attribute Decision Making: Methods and Applications. New York: Springer-Verlag. ISBN: 978-3-642-48318-9

Examples

1
2
3
4
d <- matrix(rpois(12, 5), nrow = 3, ncol = 3)
w <- c(1, 1, 2)
i <- c('+', '-', '+')
topsis(d, w, i)

Example output

  alt.row     score rank
1       1 0.4142136  2.5
2       1 0.4142136  2.5
3       1 0.5857864  1.0

linearOrdering documentation built on May 13, 2021, 1:07 a.m.