## Example taken from Cook and Cress (1992, p.74)
I <- matrix(c(0, 0, 1, 1, 1,
1, 0, 0, 0, 1,
0, 1, 0, 0, 1,
0, 1, 1, 0, 0,
0, 0, 0, 1, 0),
ncol = 5,
byrow = TRUE)
R <- relation(domain = letters[1:5], incidence = I)
## Note that this is a "preference matrix", so take complement:
R <- !R
## Compare Kendall and Wei scores
cbind(
Kendall = relation_scores(R, method = "Kendall", normalize = TRUE),
Wei = relation_scores(R, method = "Wei", normalize = TRUE)
)
Run the code above in your browser using DataLab