plurality_method {votesys}R Documentation

Plurality Method to Find Absolute or Relative Majority

Description

Although with plurality method each voter is required to mention only one candidate, a ballot with more than one candidate and different scores is also valid. For a score matrix, the function will check the position j which has the lowest score (in a vote object, the lower, the better) in the ith row. Duplicated values may or may not be a problem. For instance, c(2, 3, 3) is valid, for the lowest value is 2 and it is in the 1st position. However, c(2, 2, 3) is a problem, for the 1st and 2nd positions all have the lowest value 2. If this problem exists, the winner returned by this function will be NULL.

Usage

plurality_method(x, allow_dup = TRUE, min_valid = 1)

Arguments

x

an object of class vote.

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.

Value

a list object.

Examples

raw <- rbind(
    c(1, 2, 5, 3, 3), c(1, 2, 5, 3, 4), c(1, 2, 5, 3, 4), 
    c(NA, NA, NA, NA, NA), c(NA, 3, 5, 1, 2), 
    c(NA, NA, NA, 2, 3), c(NA, NA, 1, 2, 3), 
    c(NA, NA, NA, NA, 2), c(NA, NA, NA, 2, 2), 
    c(NA, NA, 1, 1, 2), c(1, 1, 5, 5, NA)
)
vote <- create_vote(raw, xtype = 1)
y <- plurality_method(vote, allow_dup = FALSE)
y <- plurality_method(vote, allow_dup=FALSE, min_valid = 3)

[Package votesys version 0.1.1 Index]