`redist.metrics`

is used to compute different gerrymandering metrics for a
set of maps.

partisan_metrics(map, measure, rvote, dvote, ..., .data = cur_plans()) redist.metrics( plans, measure = "DSeats", rvote, dvote, tau = 1, biasV = 0.5, respV = 0.5, bandwidth = 0.01, draw = 1, ncores = 1 )

map | a |
---|---|

measure | A vector with a string for each measure desired from list "DSeats", "DVS", "EffGap", "EffGapEqPop", "TauGap", "MeanMedian", "Bias", "BiasV", "Declination", "Responsiveness", "LopsidedWins", "RankedMarginal", and "SmoothedSeat". Use "all" to get all metrics. "DSeats" and "DVS" are always computed, so it is recommended to always return those values. |

rvote | A numeric vector with the Republican vote for each precinct. |

dvote | A numeric vector with the Democratic vote for each precinct. |

... | passed on to |

.data | a |

plans | A numeric vector (if only one map) or matrix with one row for each precinct and one column for each map. Required. |

tau | A non-negative number for calculating Tau Gap. Only used with option "TauGap". Defaults to 1. |

biasV | A value between 0 and 1 to compute bias at. Only used with option "BiasV". Defaults to 0.5. |

respV | A value between 0 and 1 to compute responsiveness at. Only used with option "Responsiveness". Defaults to 0.5. |

bandwidth | A value between 0 and 1 for computing responsiveness. Only used with option "Responsiveness." Defaults to 0.01. |

draw | A numeric to specify draw number. Defaults to 1 if only one map provided
and the column number if multiple maps given. Can also take a factor input, which will become the
draw column in the output if its length matches the number of entries in plans. If the |

ncores | Number of cores to use for parallel computing. Default is 1. |

A tibble with a column for each specified measure and a column that specifies the map number.

This function computes specified compactness scores for a map. If there is more than one precinct specified for a map, it aggregates to the district level and computes one score.

DSeats is computed as the expected number of Democratic seats with no change in votes.

DVS is the Democratic Vote Share, which is the two party vote share with Democratic votes as the numerator.

EffGap is the Efficiency Gap, calculated with votes directly.

EffGapEqPop is the Efficiency Gap under an Equal Population assumption, calculated with the DVS.

TauGap is the Tau Gap, computed with the Equal Population assumption.

MeanMedian is the Mean Median difference.

Bias is the Partisan Bias computed at 0.5.

BiasV is the Partisan Bias computed at value V.

Declination is the value of declination at 0.5.

Responsiveness is the responsiveness at the user-supplied value with the user-supplied bandwidth.

LopsidedWins computed the Lopsided Outcomes value, but does not produce a test statistic.

RankedMarginal computes the Ranked Marginal Deviation (0-1, smaller is better). This is also known as the "Gerrymandering Index" and is sometimes presented as this value divided by 10000.

SmoothedSeat computes the Smoothed Seat Count Deviation (0-1, smaller is R Bias, bigger is D Bias).

Jonathan N. Katz, Gary King, and Elizabeth Rosenblatt. 2020. Theoretical Foundations and Empirical Evaluations of Partisan Fairness in District-Based Democracies. American Political Science Review, 114, 1, Pp. 164-178.

Gregory S. Warrington. 2018. "Quantifying Gerrymandering Using the Vote Distribution." Election Law Journal: Rules, Politics, and Policy. Pp. 39-57.http://doi.org/10.1089/elj.2017.0447

Samuel S.-H. Wang. 2016. "Three Tests for Practical Evaluation of Partisan Gerrymandering." Stanford Law Review, 68, Pp. 1263 - 1321.

Gregory Herschlag, Han Sung Kang, Justin Luo, Christy Vaughn Graves, Sachet Bangia, Robert Ravier & Jonathan C. Mattingly (2020) Quantifying Gerrymandering in North Carolina, Statistics and Public Policy, 7:1, 30-38, DOI: 10.1080/2330443X.2020.1796400

data(fl25) data(fl25_enum) plans_05 <- fl25_enum$plans[, fl25_enum$pop_dev <= 0.05] redist.metrics(plans_05, measure = 'all', rvote = fl25$mccain, dvote = fl25$obama)#> # A tibble: 576 × 15 #> district DSeats DVS EffGap EffGapEqPop TauGap MeanMedian Bias BiasV #> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 1 0 0.371 0.371 -0.350 -0.915 -0.0175 0.167 0.167 #> 2 2 0 0.462 0.371 -0.350 -0.915 -0.0175 0.167 0.167 #> 3 3 0 0.443 0.371 -0.350 -0.915 -0.0175 0.167 0.167 #> 4 1 0 0.376 0.371 -0.348 -0.917 -0.0186 0.167 0.167 #> 5 2 0 0.453 0.371 -0.348 -0.917 -0.0186 0.167 0.167 #> 6 3 0 0.443 0.371 -0.348 -0.917 -0.0186 0.167 0.167 #> 7 1 0 0.378 0.371 -0.347 -0.913 0.000757 -0.167 -0.167 #> 8 2 0 0.469 0.371 -0.347 -0.913 0.000757 -0.167 -0.167 #> 9 3 0 0.423 0.371 -0.347 -0.913 0.000757 -0.167 -0.167 #> 10 1 0 0.378 0.371 -0.348 -0.917 -0.00879 0.167 0.167 #> # … with 566 more rows, and 6 more variables: Declination <dbl>, #> # Responsiveness <dbl>, LopsidedWins <dbl>, RankedMarginal <dbl>, #> # SmoothedSeat <dbl>, draw <dbl>