generate_binomial {voteSim} | R Documentation |
Generate binomial scores
Description
This function generates discrete scores following a binomial distribution on a given scale
Usage
generate_binomial(n_voters, n_candidates, min = 0, max = 10, mean = 5)
Arguments
n_voters |
integer, the number of voters to generate scores for. |
n_candidates |
integer, The number of candidates to generate scores for. |
min |
The minimum value of the distribution, by default 0 |
max |
The maximum value of the distribution, by default 10 |
mean |
The mean value of the distribution, by default 5 |
Value
A matrix of scores with 'n_candidates' rows and 'n_voters' columns.
Examples
voting_situation <- generate_binomial(n_voters=10, n_candidates=3, min=0, max=7, mean=5)
[Package voteSim version 0.1.1 Index]