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.
an object of class
whether ballots with duplicated score values are taken into account. Default is TRUE.
default is 1. If the number of valid entries of a ballot is less than this value, the ballot will not be used.
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.
call the function call.
method the counting method.
candidate candidate names.
candidate_num number of candidate.
ballot_num number of ballots in x.
valid_ballot_num number of ballots that are
used to compute the result.
winner the winners.
modified whether the modified Borda is used.
other_info a list with 2 elements, if
is FALSE, then
count_min records the total
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.