View source: R/weighted_KemenyDist&TauX.R
iw_tau_x | R Documentation |
Compute the item-weighted TauX rank correlation coefficient of a data matrix containing preference rankings, or compute the item-weighted correlation coefficient between two (matrices containing) rankings.
iw_tau_x(x, y = NULL, w)
x |
A N by M data matrix, in which there are N judges and M objects to be judged. Each row is a ranking of the objects which are represented by the columns. If there is only x as input, the output is a square matrix |
y |
A row vector, or a N by M data matrix in which there are N judges and the same M objects as x to be judged. |
w |
A M-dimensional row vector (individually weighted items), or a M by M matrix (item similarities) |
Item-weighted TauX rank correlation coefficient
Alessandro Albano alessandro.albano@unipa.it
Antonella Plaia antonella.plaia@unipa.it
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.
Albano, A. and Plaia, A. (2021) Element weighted Kemeny distance for ranking data. Electronic Journal of Applied Statistical Analysis, doi: 10.1285/i20705948v14n1p117
tau_x
TauX rank correlation coefficient
iw_kemenyd
item-weighted Kemeny distance
#Individually weighted items
data("German")
w=c(10,5,5,10)
iw_tau_x(x= German[c(1,200,300,500),],w= w)
iw_tau_x(x= German[1,],y=German[400,],w= w)
#Item similarity weights
data(sports)
P=matrix(NA,nrow=7,ncol=7)
P[1,]=c(0,5,5,10,10,10,10)
P[2,]=c(5,0,5,10,10,10,10)
P[3,]=c(5,5,0,10,10,10,10)
P[4,]=c(10,10,10,0,5,5,5)
P[5,]=c(10,10,10,5,0,5,5)
P[6,]=c(10,10,10,5,5,0,5)
P[7,]=c(10,10,10,5,5,5,0)
iw_tau_x(x=sports[c(1,3,5,7),], w= P)
iw_tau_x(x=sports[1,],y=sports[100,], w= P)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.