Skip to contents

GelmanKingIncumbency: OLS incumbency advantage of Gelman and King. ProportionalSeats: highest-averages (D'Hondt, Sainte-Lague, modified Sainte-Lague) and largest-remainder (Hare, Droop) seat allocation. RunoffWinner: two-round runoff from ranked ballots. NetworkPolarization: modularity of the party partition of the roll-call agreement network. Identical to the Python arm morie.fn.electoral.

Usage

GelmanKingIncumbency(v, v_lag, party, incumbency)

ProportionalSeats(votes, seats, method = "dhondt", threshold = 0)

RunoffWinner(ballots, n_candidates = NULL)

NetworkPolarization(votes, party)

Arguments

v, v_lag

Current and previous Democratic vote shares.

party

Previous winner's party (+1/-1), or party labels for NetworkPolarization.

incumbency

Incumbency indicator (+1, -1, 0).

votes

Party votes, or a legislators by roll-calls matrix (1, 0, NA).

seats

Number of seats.

method

Allocation method.

threshold

Legal threshold (vote fraction).

ballots

List of rankings (0-based candidate indices).

n_candidates

Number of candidates (default from the ballots).

Value

List.

References

Gelman, A. and King, G. (1990). Estimating incumbency advantage without bias. American Journal of Political Science 34, 1142-1164.

Balinski, M. L. and Young, H. P. (2001). Fair Representation, 2nd edn. Brookings Institution Press.

Waugh, A. S., Pei, L., Fowler, J. H., Mucha, P. J. and Porter, M. A. (2009). Party polarization in Congress: a network science approach. arXiv:0907.3509.

Examples

ProportionalSeats(c(100000, 80000, 30000, 20000), 8)$seats
#> [1] 4 3 1 0
RunoffWinner(c(rep(list(c(0, 1, 2)), 4), rep(list(c(1, 2, 0)), 3), rep(list(c(2, 1, 0)), 2)))$winner
#> [1] 1