Description Usage Arguments Details Value Examples
Both ordinary Borda method and modified Borda method are available. In an ordinary Borda system, voters are required to assign score values to candidates. See Details.
1 | borda_method(x, allow_dup = TRUE, min_valid = 1, modified = FALSE)
|
x |
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, the ballot will not be used. |
modified |
if the modified Borda is to be used. Default is FALSE. |
Suppose there are 5 candidates. A voter's 1st choice gets 1 point, the 2nd choice gets 2 points... Candidate with the smallest total score wins. The function does not require voters to assign scores to all candidates, for NAs are automatically assigned the highest (worst) score. Duplicated values (two or more candidates share the same score) are also allowed (note: NAs and ties may not be allowed in real ballots).
In modified Borda, the rule changes. Suppose there are 5 candidates. A voter writes down 5 candidates and his 1st choice gets 5 points. The one who gets the largest total score wins. However, if the voter only write down 2 names, then, his 1st choice gets only 2 points rather than 5 points. Thus the modified Borda encourages voters to write down more names. Besides, in modified Borda, only the ranks of true scores, rather than the true scores themselves, are used. If the raw data is a list each ballot of which contains candidate names, scores can also be extracted, that is, the 1st position is the 1st choice which gets 1 point, the 2nd position, 2 points, and so on.
a list object.
(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.
(6) valid_ballot_num
number of ballots that are
used to compute the result.
(7) winner
the winners.
(8) modified
whether the modified Borda is used.
(9) other_info
a list with 2 elements, if modified
is FALSE, then count_min
records the total
scores, count_max
is NULL; if modified
is TRUE, the vice versa.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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', 'c', 'k'))
y <- borda_method(vote)
raw <- list(c('a', 'e', 'c', 'd', 'b'), c('b', 'a', 'e'),
c('c', 'd', 'b'), c('d', 'a', 'e')
)
vote <- create_vote(raw, xtype = 3, candidate = c('a', 'b', 'c', 'd', 'e'))
y <- borda_method(vote, modified = TRUE)
|
MATCHING NAMES AND SCORES
COUNTING NA AND DUP VALUES
MAKING CONDORCET TABLE
COLLECTING RESULT
DONE
SELECTING
COLLECTING RESULT
Winner is with the lowest score, for modified is FALSE.
DONE
MATCHING NAMES AND SCORES
COUNTING NA AND DUP VALUES
MAKING CONDORCET TABLE
COLLECTING RESULT
DONE
When modified is TRUE, allow_dup is automatically set to FALSE, ignoring value given by user.
SELECTING
COLLECTING RESULT
Winner is with the largest score, for modified is TRUE.
DONE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.