Description Usage Arguments Details Value
Randomly generate a vector of salience weights for each policy dimension for a set of voters.
1 2 3 4 5 6 | genSalience(
numVotersGenSalience,
numDimsGenSalience,
salienceHeterogeneityGenSalience = 1,
maxRelativeSalienceGenSalience = 2
)
|
numVotersGenSalience |
scalar Number of voters |
numDimsGenSalience |
scalar Number of policy dimensions. Can be 1 or 2. If this is set to 1, then the salience of that one dimension will be 1 for all voters. |
salienceHeterogeneityGenSalience |
scalar [0,1] The probability that any given dimension will also have a salience of 1 for a voter. If this is set to 1 then all dimensions will have the same salience. |
maxRelativeSalienceGenSalience |
scalar The maximum relative salience for a dimension you want to allow your voters to have. |
This function used in conjunction with genVoters
to randomly generate a set of voters based on a set of user provided parameters. This function randomly generates a vector of salience weights for each policy dimension for a set of voters. For each voter, it randomly sets one dimension as the numeriare dimension with a salience of 1. The salience of the other dimension is set stocasticly based on the parameters salienceHeterogeneityGenSalience
and maxRelativeSalienceGenSalience
. salienceHeterogeneityGenSalience
allows a user can decide how much heterogeneity of salience they want to allow their set of voters to have. maxRelativeSalienceGenSalience
allows a user to set a bounds on the maximum sailence that can be for their generated voters. You are not required to use this function to provide the voter's saliences. You may simply provide a numberOfVoters x numberOfDimensions matrix to setVoters
outSalience numVoters x numDimensions matrix of salience weights. For one voter/row, each element of the vector represents the *relative* saliance of each dimension for a voter. The dimension with the lowest salience serves as the "numeraire" dimension and should recieve a salience of 1. All the other saliences are expressed in units of this "numeraire". So if a dimension is twice as important to a voter as the numeraire dimension it recieves a salience of 2. Example: 1 2 1 3 2 1 1 1 4 1 For voter two (second row) the salience of dimension one (first column) is the numeraire. For this voter dimension two is twice as salient as dimension one.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.