voting {i3pack} | R Documentation |
Function to simulate the voting process
Description
Internal function.
Usage
voting(
voters,
nominated,
n_votes,
gamma_val,
gamma_rank,
epsilon,
free = TRUE,
closed_primary = FALSE,
strategic = FALSE,
strategic_error = 0.05,
party_pos = NULL
)
Arguments
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). |
Value
List with two elements:
- votes
Matrix with
n_votes
rows andlength(voters)
columns, with cells populated with candidate IDs- max_utils
Vector of maximum utilities received by each voter from among all candidates in the election
[Package i3pack version 0.1.0 Index]