generate_beta_binomial | R Documentation |
This function generates discrete scores following a beta-binomial distribution on a given scale
generate_beta_binomial(
n_voters,
n_candidates,
min = 0,
max = 10,
alpha = 0.5,
beta = 0.5
)
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 |
alpha |
The first parameter of the beta-binomial distribution, by default 0.5 |
beta |
The second parameter of the beta-binomial distribution, by default 0.5 |
A matrix of scores with 'n_candidates' rows and 'n_voters' columns.
voting_situation <- generate_beta_binomial(n_voters=10, n_candidates=3, max=7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.