powered by
Currently only implements the competitiveness function in equation (5) of Cho & Liu 2016.
competitiveness(map, rvote, dvote, .data = cur_plans())redist.competitiveness(plans, rvote, dvote)
redist.competitiveness(plans, rvote, dvote)
a redist_map object
redist_map
A numeric vector with the Republican vote for each precinct.
A numeric vector with the Democratic vote for each precinct.
a redist_plans object
redist_plans
A numeric vector (if only one map) or matrix with one row for each precinct and one column for each map. Required.
Numeric vector with competitiveness scores
# NOT RUN { data(fl25) data(fl25_enum) plans_05 <- fl25_enum$plans[, fl25_enum$pop_dev <= 0.05] comp <- redist.competitiveness(plans_05, fl25$mccain, fl25$obama) # }
Run the code above in your browser using DataLab