getQ.Rd
This function calculates the Q matrix given a collection of (partial) rankings.
getQ(rankings, I, J)
A matrix of rankings, potentially with attribute "assignments" to signify separate reviewer assignments. One ranking per row.
A numeric entry indicating the total number of judges providing rankings and ratings.
A numeric entry or vector of positive integers indicating total number of objects.
A matrix with dimension J
x J
.
rankings <- matrix(c(1,2,3,4,2,1,NA,NA),byrow=TRUE,nrow=2)
getQ(rankings=rankings,I=2,J=4)
#> [,1] [,2] [,3] [,4]
#> [1,] 0.0 0.5 1 1.0
#> [2,] 0.5 0.0 1 1.0
#> [3,] 0.0 0.0 0 0.5
#> [4,] 0.0 0.0 0 0.0
attr(rankings,"assignments") <- matrix(c(rep(TRUE,7),FALSE),byrow=TRUE,nrow=2,ncol=4)
getQ(rankings=rankings,I=2,J=4)
#> [,1] [,2] [,3] [,4]
#> [1,] 0.0 0.5 1 0.5
#> [2,] 0.5 0.0 1 0.5
#> [3,] 0.0 0.0 0 0.5
#> [4,] 0.0 0.0 0 0.0