View source: R/generate_simulated_election_results.R
simulate_ordinal_results_from_dirichlet | R Documentation |
Generate simulated election results from Dirichlt distribution
simulate_ordinal_results_from_dirichlet(k = 4, n = 10000, alpha = NULL)
k |
The number of candidates |
n |
The number of simulated elections to draw |
alpha |
Optional vector of Dirichlet parameters of length 'factorial(k)'. If omitted, random parameters will be drawn. |
A tibble with a column 'id' and a column for each unique ballot type.
simulate_ordinal_results_from_dirichlet(n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.