| cdc_dodgson {votesys} | R Documentation |
Dodgson Method
Description
The original Dodgson method checks the number of
votes each candidate has to rob from other candidates;
the winner is with the smallest number. However, the
function cdc_dodgson uses two alternative methods
rather than the original Dodgson method. The two methods
are Tideman score method and Dodgson Quick method.
See Details.
Usage
cdc_dodgson(x, allow_dup = TRUE, min_valid = 1, dq_t = "dq")
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. |
dq_t |
the alternative Dodgson methods to be used. Default is "dq", for Dodgson Quick method; it can also be "t", Tideman score method. |
Details
Suppose the candidates are A, B, C and D. If A wins B in pairwise comparison or has equal votes with B, then add 0 to A. If C wins A, then add to A adv(C, A), that is, the number of voters that prefer C than A, minus the number of voters that prefer A than A. Again, if D wins A, then add to A that number. Then, we sum up the points belong to A. We do the same thing to B, C and D. The one gets the least points is the winner. This is what we do in Tideman score method. In Dodgson Quick method, we first compute the number of votes, then divide it by 2 and get the ceiling, and sum all of them up.
Value
a condorcet object, which is essentially
a list.
(1)
callthe function call.(2)
methodthe counting method.(3)
candidatecandidate names.(4)
candidate_numnumber of candidate.(5)
ballot_numnumber of ballots in x. When x is not avoteobject, it may be NULL.(6)
valid_ballot_numnumber of ballots that are actually used to compute the result. When x is not avoteobject, it may be NULL.(7)
winnerthe winners.(8)
input_objectthe class of x.(9)
cdcthe Condorcet matrix which is actually used.(10)
difthe score difference matrix. When x is not avoteobject, it may be NULL.(11)
binarywin and loss recorded with 1 (win), 0 (equal) and -1 (loss).(12)
summary_mtimes of win (1), equal (0) and loss (-1).(13)
other_infoa list with four elements. The 1st indicates the method used to compute score. The 2nd is the score for pairwise comparison (number of votes one has to rob). The 3rd is Tideman score summary (the smaller the better). The 4th is Dodgson Quick summary (the smaller the better).
References
McCabe-Dansted, J. & Slinko, A. 2008. Approximability of Dodgson's Rule. Social Choice and Welfare, Feb, 1-26.
Examples
raw <- list2ballot(
x = list(
c('A', 'B', 'C', 'D', 'E', 'F'),
c('F', 'A', 'B', 'C', 'D', 'E'),
c('E', 'D', 'C', 'B', 'F', 'A'),
c('B', 'A', 'C', 'D', 'E', 'F'),
c('F', 'E', 'D', 'C', 'B', 'A'),
c('F', 'B', 'A', 'C', 'D', 'E'),
c('E', 'D', 'C', 'A', 'F', 'B'),
c('E', 'B', 'A', 'C', 'D', 'F'),
c('F', 'D', 'C', 'A', 'E', 'B'),
c('D', 'B', 'A', 'C', 'E', 'F'),
c('F', 'E', 'C', 'A', 'D', 'B')
),
n = c(19, 12, 12, 9, 9, 10, 10 , 10 , 10, 10, 10)
)
vote <- create_vote(raw, xtype = 3, candidate = c('A', 'B', 'C', 'D', 'E', 'F'))
win1 <- cdc_simple(vote) # no winner
win2 <- cdc_dodgson(vote, dq_t = "dq") # A
win2 <- cdc_dodgson(win1, dq_t = "dq") # A
win3 <- cdc_dodgson(vote, dq_t = "t") # B
win3 <- cdc_dodgson(win2, dq_t = "t") # B