genLossOrder: genLossOrder Generates Loss Function Orders for voters in a...

Description Usage Arguments Value

View source: R/genLossOrder.R

Description

Randomly generate a Loss Function Order for all voters in a data set. genLossOrder is used in conjuction with GenMinkoOrder, genSalience and genIdeals by genVoters to generate the parameters of each agent's Salience Weighted Minkowski Utility function.

Usage

1
2
3
4
5
6
7
genLossOrder(
  numVotersGenLoss,
  lossOrderForAllGenLoss = FALSE,
  probabilityLinearGenLoss = 1,
  probabilityQuadraticGenLoss = 0,
  probabilityCubicGenLoss = 0
)

Arguments

numVotersGenLoss

scalar Number of voters

lossOrderForAllGenLoss

logical or scalar If If FALSE (the default) then the agent's loss order for their utility function is determined by the other parameters in this function. If a number is provided this will be the order of the loss function for all voters.

probabilityLinearGenLoss

scalar [0,1] The probability that any given voter will have elliptical (Minkowski Order of 2) indifference curves.

probabilityQuadraticGenLoss

scalar [0,1] The probability that any given voter will have Manhattan/Diamond (Minkowski Order = 1) indifference curves.

probabilityCubicGenLoss

scalar [0,1] The probability that any given voter will have Chebyshev/Square (Minkowski Order = 100) indifference curves.

Value

outMinkowskiOrder numVoters x 1 A vector of minkowski orders, one for each voter that determines the overall shape of the voter's indifference curves.


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