Description Usage Arguments Value
Creates a data.frame to hold the group level data for the simulation.
1 2 3 | genGroupLevelDataFrame(groupSize, utilityDistribution,
utilityDistributionParameters, errorDistribution, errorDistributionParameters,
groupPostFailingProposalMeanUiIncrease)
|
groupSize |
This is a vector that has a length of numberOfGroups. Each element indicates the number of voters in each group. While the examples in the paper use 3 groups, the package can handle any number of groups. |
utilityDistribution |
The distribution the utility ui values will be drawn from. This can currently only be "normal". |
utilityDistributionParameters |
The relevant parameters needed for the distribution provided as utilityDistribution. You must provide a pair of parameters for each group. For "normal" you must provide the mean and standard deviation. For example for 5 groups and utilityDistribution="normal", you might provide c(-.7,.2,-.1,.2,0,.2,-.3,.2,.2,.2). |
errorDistribution |
The distribution the error ei values will be drawn from. This can be "uniform", "normal". |
errorDistributionParameters |
The relevant parameters needed for the distribution provided as errorDistribution. For "normal" you must provide the mean and standard deviation. For "uniform" you must provide the lower bound and upper bound. For example for 5 groups and errorDistribution="uniform", you might provide c(-.7,0,-.1,.3,0,.2,-.3,.2,-.2,.2). |
groupPostFailingProposalMeanUiIncrease |
The amount the mean used to sample a group's ui goes up after a failing proposal. Must be entered as a string vector. |
groupsDataFrame A dataframe with G rows, containing the following columns: groupID, utilityDistribution, utilityDistributionParam1, utilityDistributionParam2, errorDistribution, errorDistributionParam1, errorDistributionParam2, groupPostFailingProposalMeanUiIncrease.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.