scores            package:relations            R Documentation(utf8)

_R_e_l_a_t_i_o_n _S_c_o_r_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Compute scores for the tuples of an endorelation.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

       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.

_D_e_t_a_i_l_s:

     In the following, consider the pairs of relation R, represented by
     'x'.  Available built-in methods are as follows:

     '"_B_a_r_t_h_e_l_e_m_y/_M_o_n_j_a_r_d_e_t"' for each a in the domain of R, (M(a) +
          N(a) - 1) / 2, where M(a) and N(a) are the numbers of objects
          b such that b R a, and b R a and not a R b, respectively. If
          R is a <= preference relation, we get the number of dominated
          objects plus half the number of the equivalent objects minus
          1, i.e., the usual average ranks minus 1. See Barthélemy and
          Monjardet (1981).

     '"_W_e_i"' the eigenvector corresponding to the greatest eigenvalue
          of the incidence matrix of the complement of R. See Wei
          (1952).

     '"_K_e_n_d_a_l_l"', '"_B_o_r_d_a"' the column sums of the incidence matrix,
          i.e., for each object a, the number of objects b such that b
          R a. See Borda (1770) and Kendall (1955).

     '"_d_i_f_f_e_r_e_n_t_i_a_l"' the column sums of the incidence matrix minus the
          row sums.  For each object a, this is the  difference of the
          numbers of objects b such that b R a and a R b, respectively.
           In the case of a <= preference relation, this is the
          difference between the _indegree_ and the _outdegree_ of each
          object/node in the digraph corresponding to the relation
          incidence. See Regenwetter and Rykhlevskaia (2004).

     '"_r_a_n_k_B"' a linear transformation of the differential D(R), so
          that the scores of the n objects start with 1: (n + 1 + D(R))
          / 2.

_V_a_l_u_e:

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

_R_e_f_e_r_e_n_c_e_s:

     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.

_E_x_a_m_p_l_e_s:

     ## 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)
          )

