threshold_and_replace_party_with_coalition: Applies the threshold rule and replaces the parties in the...

Description Usage Arguments Value

View source: R/coalitions.R

Description

For each day, it is checked whether data is available for all parties in the coalition. If not, if threshold is greater than zero, NA or zero is inserted depending on the threshold_handle value.

Usage

1
2
threshold_and_replace_party_with_coalition(data, threshold, threshold_handle,
  coalitions)

Arguments

data

[data.frame]
the elections data frame.

threshold

[numeric(1)]
If positive, indicates the minimum voice component that a party has to reach in order to participate in a coalition.

threshold_handle

[character(1)]
Specifies how to handle coalitions with parties that have less percentage than threshold.

coalitions

[list]
The coalitions for which prediction is calculated.

Value

data with applied threshold rule and replaced party names with coalition names.


pollyvote/pollyvoter documentation built on April 4, 2018, 8:18 p.m.