predict_iii {i3pack} | R Documentation |
Predict II Score for a given set of electoral rule configurations
Description
Predict II Score for a given set of electoral rule configurations
Usage
predict_iii(
data,
score = c("TDE", "AP"),
district_level = TRUE,
return_avg = TRUE
)
Arguments
data |
A data.frame containing the following variables: |
score |
Character string indicating type of score to predict; one of |
district_level |
Boolean: Should district level, or country level models be used? If |
return_avg |
Boolean: Should the average score across imputed models be returned? The original models
were trained on millions of simulated elections, with intermediate values for some parameters interpolated using
5 multiple imputations. If |
Value
Predicted TDE or AP score for given electoral system
Examples
## Create example data for PR system with closed party lists,
## magnitude 5, and Droop quota
new_system <- data.frame(ballot_type = as.factor("closed"),
pool_level = as.factor("party"),
votes_per_voter = as.factor("One"),
M = 5.0,
threshold = 0.05,
formula = as.factor("droop"))
predict_iii(data = new_system, score = "AP", district_level = FALSE)