View source: R/rank_paircomp.R
set_paircomp | R Documentation |
Pairwise comparisons from a PlackettLuce ranking object. Ties are not taken into account, then coerced to NA's.
set_paircomp(object)
object |
an object of class "rankings" or "grouped_rankings" which is a matrix of dense rankings. |
an object of class "paircomp" which is a matrix of pairwise comparisons
Kauê de Sousa and Jacob van Etten
Strobl C., Wickelmaier F. & Zeileis A. (2011). Journal of Educational and Behavioral Statistics, 36(2), 135–153. doi:10.3102/1076998609359791
rankings
,
paircomp
Other rank functions:
rank_numeric()
,
rank_tricot()
,
set_binomialfreq()
library("PlackettLuce")
R = matrix(c(1, 2, 0, 0,
4, 1, 2, 3,
2, 4, 3, 1,
1, 2, 3, 0,
2, 1, 1, 0,
1, 0, 3, 2), nrow = 6, byrow = TRUE)
colnames(R) = c("apple", "banana", "orange", "pear")
R = as.rankings(R)
PC = set_paircomp(R)
#############################################
# using breadwheat data
data("breadwheat", package = "gosset")
# convert the tricot rankings from breadwheat data
# into a object of class 'rankings' from PlackettLuce
R = rank_tricot(breadwheat,
items = c("variety_a","variety_b","variety_c"),
input = c("overall_best","overall_worst"))
PC = set_paircomp(R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.