voting | R Documentation |
Internal function.
voting(
voters,
nominated,
n_votes,
gamma_val,
gamma_rank,
epsilon,
free = TRUE,
closed_primary = FALSE,
strategic = FALSE,
strategic_error = 0.05,
party_pos = NULL
)
voters |
See |
nominated |
See |
n_votes |
See |
gamma_val |
See |
gamma_rank |
See |
epsilon |
Numeric; maximum acceptable ideological distance used in voters' utility function |
free |
See |
closed_primary |
Boolean: Are voters required to vote for a candidate in the party closest to them in the primary? Defaults to |
strategic |
See |
strategic_error |
See |
party_pos |
Locations of parties in the election in 1d space (-2, 2). |
List with two elements:
Matrix with n_votes
rows and length(voters)
columns, with cells populated with candidate IDs
Vector of maximum utilities received by each voter from among all candidates in the election
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.