merge_small_options: Merge small parties and/or candidates
Description
Merge small parties and also small candidates by, respectively, aggregating them
in the options 'Other parties votes' and 'Other candidates votes'.
Usage
merge_small_options(x, min.party, min.candidate)
Arguments
x
A tibble with the same components and structure as the tibbles in the ei.Datasets package.
For instance, like the ei_NZ_2020 object.
min.party
A number between 0 and 100. Those parties which individually did not reach
at least min.party% of the election-district vote are grouped in the option
<U+2018>Other parties votes<U+2019>.
min.candidate
A number between 0 and 100. Those candidates which individually did not
reach at least min.candididate% of the election-district vote are grouped
in the option <U+2018>Other candidates votes<U+2019>.
Value
A tibble similar to x with small parties and candidates merged on, respectively, <U+2018>Other parties votes<U+2019>
and <U+2018>Other candidates votes<U+2019>, with min.party and min.candidate used to determine when an electoral
option is small.
References
Pavia, JM (2021). ei.Datasets: Real datasets for assessing ecological inference algorithms, Social Science Computer Review, forthcoming.