cdc_rankedpairs {votesys} | R Documentation |
Ranked Pairs Method
Description
It is also called Tideman method. See details.
Usage
cdc_rankedpairs(x, allow_dup = TRUE, min_valid = 1)
Arguments
x |
it accepts the following types of input:
1st, it can be an object of class |
allow_dup |
whether ballots with duplicated score values are taken into account. Default is TRUE. |
min_valid |
default is 1. If the number of valid entries of a ballot is less than this value, it will not be used. |
Details
The method first summarizes the result of pairwise comparison, the order used is the order of winning votes from large to small. So if pairwise comparison has ties (that is, the number of voters who prefer a than b is equal to the number of voters who prefer b than a, the method will fail, and the winner will be NULL).
The second step is called tally. If a wins b with 100 votes, b wins c with 80 votes, then we put a-b-100 ahead of b-c-80. Suppose a wins b with 100 votes, a wins c with 100 votes, then we have a tie; so we have to check the relation between b and c. If b wins c, then we put a-c-100 ahead of a-b-100. Suppose a wins b with 100 votes, d wins b with 100 votes, then again we have a tie and have to check the a-d relation. If d wins a, then we put d-b-100 ahead of a-b-100. Suppose a wins b with 100 votes, e wins f with 100 votes, then the ties cannot be solved, so the winner will be NULL.
The third step, after the above mentioned tally, is called lock-in. As the relations have been sorted according to their strength from large to small in the tally step, we now add them one by one. The rule is: if a relation is contradictory with those already locked in relations, this relation will be discarded.
For example, suppose we have already add relation a > b and b > c, then the two relations are locked in. As a result, we should not add b > a. Also, as a > b and b > c indicate a > c, so we should not add c > a. After this process, we will finally find the winner who defeats all others.
Value
a condorcet
object, which is essentially
a list.
(1)
call
the function call.(2)
method
the counting method.(3)
candidate
candidate names.(4)
candidate_num
number of candidate.(5)
ballot_num
number of ballots in x. When x is not avote
object, it may be NULL.(6)
valid_ballot_num
the number of ballots that are actually used to compute the result. When x is not avote
object, it may be NULL.(7)
winner
the winner, may be NULL.(8)
input_object
the class of x.(9)
cdc
the Condorcet matrix which is actually used.(10)
dif
the score difference matrix. When x is not avote
object, it may be NULL.(11)
binary
win and loss recorded with 1 (win), 0 (equal) and -1 (loss).(12)
summary_m
times of win (1), equal (0) and loss (-1).(13)
other_info
a list of 3 elements. The 1st is the reason of failure. If winner exists, it will be blank. The 2nd is the tally result (it may contain unsolved ties). The 3rd is the lock-in result; if the method fails, it will be NULL.
References
Tideman, T. 1987. Independence of clones as a criterion for voting rules. Social Choice and Welfare, 4(3), 185-206.
Examples
raw <- rbind(c('m', 'n', 'c', 'k'), c('n', 'c', 'k', 'm'),
c('c', 'k', 'n', 'm'), c('k', 'c', 'n', 'm'))
raw <- list2ballot(m = raw, n = c(42, 26, 15, 17))
vote <- create_vote(raw, xtype = 2, candidate = c('m', 'n', 'c', 'k'))
y <- cdc_rankedpairs(vote)