Description Usage Arguments Value References Examples
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.
1 | cdc_minmax(x, allow_dup = TRUE, min_valid = 1, variant = 1)
|
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. |
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 a vote
object, it may be NULL.
(6) valid_ballot_num
number of ballots that are
actually used to compute the result. When
x is not a vote
object, it may be NULL.
(7) winner
the winners.
(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 a vote
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 4 elements. The 1st is
the method, which is equal to variant
. The 2nd is the
winning votes matrix. The 3rd is the margins matrix. The 4th
is the pairwise comparison matrix.
https://en.wikipedia.org/wiki/Minimax_Condorcet_method
1 2 3 4 5 6 7 8 9 10 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.