LPScores {socialranking}R Documentation

LP Ranking

Description

Calculate the LpL^{p} scores.

Usage

LPScores(powerRelation, elements = powerRelation$elements)

LPRanking(powerRelation)

lexcelPScores(powerRelation, elements = powerRelation$elements)

lexcelPRanking(powerRelation)

Arguments

powerRelation

A PowerRelation object created by PowerRelation() or as.PowerRelation()

elements

Vector of elements of which to calculate their scores. By default, the scores of all elements in powerRelation$elements are considered.

Details

Let NN be a set of elements, T(P)\succsim \in \mathcal{T}(\mathcal{P}) a power relation, and Σ1Σ2Σm\Sigma_1 \succ \Sigma_2 \succ \dots \succ \Sigma_m its corresponding quotient order.

For an element iNi \in N, construct a matrix MiM^\succsim_i with mm columns and N|N| rows. Whereas each column qq represents an equivalence class, each row pp corresponds to the coalition size.

(Mi)p,q={SΣq:S=p and iS}(M^\succsim_i)_{p,q} = |\lbrace S \in \Sigma_q: |S| = p \text{ and } i \in S\rbrace|

For i,jNi, j \in N, the social ranking solution LpL^p then ranks ii strictly above jj if one of the following conditions hold:

  1. {i}{j}\lbrace i \rbrace \succ \lbrace j \rbrace;

  2. {i},{j}Σk\lbrace i \rbrace, \lbrace j \rbrace \in \Sigma_k and there exists a row p0{2,,N}p_0 \in \lbrace 2, \dots, |N|\rbrace such that:

    q<k(Mi)p,q=q<k(Mj)p,qp<p0, and\sum_{q < k} (M^\succsim_i)_{p,q} = \sum_{q < k} (M^\succsim_j)_{p,q}\quad \forall p < p_0,\text{ and}

    q<k(Mi)p0,q>q<k(Mj)p0,q.\sum_{q < k} (M^\succsim_i)_{p_0,q} > \sum_{q < k} (M^\succsim_j)_{p_0,q}.

In R, given two matrices M_i and M_j, this comparison could be expressed as

# function that returns TRUE if i should be ranked strictly above j
k_i <- which(M_i[1,] == 1)
k_j <- which(M_j[1,] == 1)
if(k_i != k_j) return(k_i < k_j)
if(k_i == 1)   return(FALSE)
# get sum for each row
# removing the first row implies that we start in row 2
sums_i <- apply(M_i[-1,seq(k_i-1)], 1, sum)
sums_j <- apply(M_j[-1,seq(k_j-1)], 1, sum)
# apply lexcel comparison
i <- which(a != b)
return(length(i) > 0 && a[i[1]] > b[i[1]])

Value

Score function returns a list of type LPScores and length of powerRelation$elements (unless parameter elements is specified). Each index contains a vector of length length(powerRelation$elements).

Ranking function returns corresponding SocialRanking object.

Example

Let :(123122)(1323)(13{})\succsim: (123 \sim 12 \sim 2) \succ (13 \sim 23) \succ (1 \sim 3 \sim \{\}). From this, we get the following three matrices:

M1=[001110100]M2=[100101100]M3=[001020100] M^\succsim_1 = \begin{bmatrix} 0 & 0 & 1\\ 1 & 1 & 0\\ 1 & 0 & 0 \end{bmatrix} M^\succsim_2 = \begin{bmatrix} 1 & 0 & 0\\ 1 & 0 & 1\\ 1 & 0 & 0 \end{bmatrix} M^\succsim_3 = \begin{bmatrix} 0 & 0 & 1\\ 0 & 2 & 0\\ 1 & 0 & 0 \end{bmatrix}

(M2)2,3(M^\succsim_2)_{2,3} in this context refers to the value in the second row and third column of element 2, in this case 11.

In the example, 22 will be immediately put above 11 and 33 because {2}{1}\lbrace 2 \rbrace \succ \lbrace 1 \rbrace and {2}{3}\lbrace 2 \rbrace \succ \lbrace 3 \rbrace. Since {1}{3}\lbrace 1 \rbrace \sim \lbrace 3 \rbrace, we next consider the coalitions of size 2. Here, it turns out that (M1)2,1+(M1)2,2=1+1(M^\succsim_1)_{2,1} + (M^\succsim_1)_{2,2} = 1 + 1 is equal to (M3)2,1+(M3)2,2=0+2(M^\succsim_3)_{2,1} + (M^\succsim_3)_{2,2} = 0 + 2. For obvious reasons the grand coalition does not have to be considered, thus 11 and 33 are considered equally powerful by the LpL^p solution.

LpL^{p} is a social ranking solution belonging to the family of lexicographical ranking functions. While related to L1Ranking(), it incorporates the property of "standardness", stating that if the singleton coalition {i}{j}\lbrace i\rbrace \succ \lbrace j\rbrace, then the ranking solution should also prefer ii over jj.

If {i}{j}\lbrace i\rbrace \sim \lbrace j\rbrace, then all coalitions from size 2 and upward are inspected, giving higher precedence to coalitions with a lower number of elements. While this preference is similar to the L(1)L^{(1)}, it differs in two notable ways:

  1. If {i},{j}Σk\lbrace i\rbrace, \lbrace j\rbrace \in \Sigma_k, then only coalitions S({i}{j})S \succsim (\lbrace i \rbrace \sim \lbrace j \rbrace) are considered,

  2. From this subset of coalitions, consider the total number of coalitions ii (or jj) belongs to, given each coalition size. This may ignore information about the distribution of these coalitions within the different equivalence classes, which L(1)L^{(1)} and the slight variation LpL^{p^*} of the LpL^p solution take into account.

Alterations

The matrices as described above and in Béal S, Rémila E, Solal P (2022). “Lexicographic solutions for coalitional rankings based on individual and collective performances.” Journal of Mathematical Economics, 102, 102738. can be investigated with the L1Scores() function.

For efficiency, LPScores() discards much of the redundant information. Instead of a matrix for each element, it returns a vector of size N|N|.

Given a score vector v for an element i, v[1] is the position of the singleton coalition {i}. This implies that if v[1] < w[1], where w is the score vector of an element j, then i is ranked strictly above j.

v[2], v[3], ..., v[n] then indicates the number of coalitions of size 2, 3, ..., n that the element i appears in.

Aliases

For better discoverability, lexcelPScores() and lexcelPRanking() serve as aliases for LPScores() and LPRanking(), respectively.

References

Béal S, Rémila E, Solal P (2022). “Lexicographic solutions for coalitional rankings based on individual and collective performances.” Journal of Mathematical Economics, 102, 102738.

See Also

Other ranking solution functions: L1Scores(), L2Scores(), LPSScores(), copelandScores(), cumulativeScores(), kramerSimpsonScores(), lexcelScores(), ordinalBanzhafScores()

Examples

pr <- as.PowerRelation("(123 ~ 13 ~ 2) > (12 ~ 1 ~ 3) > (23 ~ {})")
scores <- LPScores(pr)
scores$`2`
# [1] 1 0 0

LPRanking(pr)
# 2 > 1 ~ 3

# Since L^(1) also the relation {1,2}, which ranks above {2,3}, it will place 1 above 3
L1Ranking(pr)
# 2 > 1 > 3


[Package socialranking version 1.2.0 Index]