borda_method {votesys} | R Documentation |
Borda Count Method
Description
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.
Usage
borda_method(x, allow_dup = TRUE, min_valid = 1, modified = FALSE)
Arguments
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. |
Details
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.
Value
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, ifmodified
is FALSE, thencount_min
records the total scores,count_max
is NULL; ifmodified
is TRUE, the vice versa.
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', '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)