Learn R Programming

ConsRank (version 3.0)

scorematrix: Score matrix according Emond and Mason (2002)

Description

Given a ranking, it computes the score matrix as defined by Emond and Mason (2002)

Usage

scorematrix(X, use_cpp = TRUE)

Value

the M by M score matrix

Arguments

X

a ranking (must be a row vector or, better, a matrix with one row and M columns)

use_cpp

Logical. If TRUE (default), uses C++ implementation for faster computation. If FALSE, uses the R implementation.

Author

Antonio D'Ambrosio antdambr@unina.it

References

Emond, E. J., and Mason, D. W. (2002). A new rank correlation coefficient with application to the consensus ranking problem. Journal of Multi-Criteria Decision Analysis, 11(1), 17-28.

See Also

combinpmatr The combined inut matrix

Examples

Run this code
Y <- matrix(c(1,3,5,4,2),1,5)
SM<-scorematrix(Y)
#
Z<-c(1,2,4,3)
SM2<-scorematrix(Z)

Run the code above in your browser using DataLab