dowdall_method: Dowdall Method

Description Usage Arguments Value References Examples

View source: R/dowdall_method.R

Description

This is an alternative Borda method. Voters are required to assign preference scores to every candidate and one score value cannot be shared by two or more candidates. For a voter, his 1st choice gets 1, his 2nd choice gets 1/2, his 3rd choice gets 1/3... The candidate who gets the most points wins. For the function dowdall_method, ranks, rather than true values, are used. So 1, 3, 5 are ranked as 1, 2, 3, and the scores are 1/1, 1/2, 1/3.

Usage

1

Arguments

x

an object of class vote. The ballots in the object should not have duplicated values and NAs.

stop

default is FALSE, when ballots do have duplicated values or NAs, error will not be raised, but the winner will be NULL. If TRUE, an error will be raised.

Value

a list object.

References

Examples

1
2
3
4
5
6
raw <- list2ballot(string = 
    c("51: a>c>b>d", "5: c>b>d>a", "23: b>c>d>a", "21: d>c>b>a")
)
vote <- create_vote(raw, xtype = 3, candidate = c("a", "b", "c", "d"))
y1 <- borda_method(vote) # winner is c
y2 <- dowdall_method(vote) # winner is a

Example output

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
SELECTING
COLLECTING RESULT
DONE

votesys documentation built on May 2, 2019, 1:32 p.m.