voteByUtilCumu: voteByUtilCumu Allocate votes based utility values,...

Description Usage Arguments Value

View source: R/voteByUtilCumu.R

Description

voteByUtilCumu Allocate votes based utility values, cumulation is allowed.

Voters allocate their votes based on their utillity for each of the alternatives being considered. Once removing any alternatives that are below a voters abstension threshold the utility a voter has for each alternative is calculated. Then the ratio utilityForAnAlternative/sumOfAllUtilityForAlternatives is calculated for each alternative the voter allocates their numVotes of votes accoording to those ratios. Rounding to whole votes is acomplished using the "last integer method" with the function roundPreserveSum. See ?roundPreserveSum for more details. This function is usually not called directly but is wrapped by votersVote.

Usage

1
2
3
4
voteByUtilCumu(
  votersUtilsForAltsVoteByUtilCumu,
  numVotesPerVoterVoteByUtilCumu
)

Arguments

votersUtilsForAltsVoteByUtilCumu

numVoters by numAlts matrix of utility values.

numVotesPerVoterVoteByUtilCumu

the number of votes each voter is allowed to cast. This function does not allow cumulation of votes.

Value

outVotesVoteByUtilCumu A 1 x numberOfAlts matrix displaying the number of votes cast for each alternative.


robiRagan/voteR documentation built on Feb. 27, 2020, 6:48 p.m.