Learn R Programming

relations (version 0.2-0)

scores: Relation Scores

Description

Compute scores for the tuples of an endorelation.

Usage

relation_scores(x,
                method = c("Barthelemy/Monjardet", "Wei", "Borda",
                           "Kendall", "differential", "rankB"),
                normalize = FALSE)

Arguments

x
an object inheriting from class relation, representing an endorelation.
method
character string indicating the method (see details).
normalize
logical indicating whether the score vector should be normalized to sum up to 1.

Value

  • A vector of scores, with names taken from the relation domain labels.

encoding

UTF-8

Details

In the following, consider the pairs of relation $R$, represented by x. Available built-in methods are as follows: [object Object],[object Object],[object Object],[object Object],[object Object]

References

J.-P. Barthélemy and B. Monjardet (1981), The median procedure in cluster analysis and social choice theory. Mathematical Social Sciences, 1:235--267.

J. C. Borda (1781), Mémoire sur les élections au scrutin. Histoire de l'Académie Royale des Sciences.

M. Kendall (1955), Further contributions to the theory of paired comparisons. Biometrics, 11:43--62.

M. Regenwetter and E. Rykhlevskaia (2004), On the (numerical) ranking associated with any finite binary relation. Journal of Mathematical Psychology, 48:239--246. T. H. Wei (1952). The algebraic foundation of ranking theory. Unpublished thesis, Cambridge University.

Examples

Run this code
## 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