| cdc_minmax {votesys} | R Documentation |
Minmax Method
Description
Minmax method (also known as Simpson-Kramer method, successive reversal method) means three different methods. The first is winning votes method. In pairwise comparison, if a wins b, a gets 0 point, the number of points for b is the number of voters who prefer a than b. The second method is to use margins. In pairwise comparison, a gets b - a points and b gets a - b points. The third method is pairwise opposition method. The number of points for a is the number of voters who prefer b than a; the number of points for b is the number of voters who prefer a than b. Although the point-assigning methods are different for the above three methods, they nonetheless do the same thing: to check to what extent one candidate is defeated by others. So the summarizing method is the same: for each candidate, we extract the maximum target points, and the one with the minimum points wins.
Usage
cdc_minmax(x, allow_dup = TRUE, min_valid = 1, variant = 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. |
variant |
should be 1, 2 or 3. 1 (default) for winning votes method, 2 for margins method, 3 for pairwise comparison method. |
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 of 4 elements. The 1st is the method, which is equal tovariant. The 2nd is the winning votes matrix. The 3rd is the margins matrix. The 4th is the pairwise comparison matrix.
References
https://en.wikipedia.org/wiki/Minimax_Condorcet_method
Examples
raw <- c(
rep(c('m', 'n', 'c', 'k'), 42), rep(c('n', 'c', 'k', 'm'), 26),
rep(c('c', 'k', 'n', 'm'), 15), rep(c('k', 'c', 'n', 'm'), 17)
)
raw <- matrix(raw, ncol = 4, byrow = TRUE)
vote <- create_vote(raw, xtype = 2, candidate = c('m', 'n', 'k', 'c'))
win1 <- cdc_simple(vote)
win2 <- cdc_minmax(vote) # winner is n
win3 <- cdc_minmax(win1, variant = 2)
win4 <- cdc_minmax(win3$cdc, variant = 3)