dHondt: The D'Hondt Method of Allocating Seats Proportionally In SciencesPo: A Tool Set for Analyzing Political Behavior Data

Description

The function calculates seats allotment in legislative house, given the total number of seats and the votes for each party based on the Victor D'Hondt's method (1878). The D'Hondt's method is mathematically equivalent to the method proposed by Thomas Jefferson few years before (1792).

Usage

 ```1 2 3``` ```dHondt(parties = NULL, votes = NULL, seats = NULL, ...) dHondt(parties = NULL, votes = NULL, seats = NULL, ...) ```

Arguments

 `parties` a vector containig parties labels or candidates accordingly to the `votes` vector order. `votes` a vector containing the total number of formal votes received by the parties/candidates. `seats` an integer for the number of seats to be filled (the district magnitude). `...` Additional arguements (currently ignored)

Value

A `data.frame` of length `parties` containing apportioned integers (seats) summing to `seats`.

Note

Adapted from Carlos Bellosta's replies in the R-list.

Author(s)

Daniel Marcelino, [email protected].

References

Lijphart, Arend (1994). Electoral Systems and Party Systems: A Study of Twenty-Seven Democracies, 1945-1990. Oxford University Press.

`HighestAverages`, `LargestRemainders`, `Hamilton`, `PoliticalDiversity`.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```votes <- sample(1:10000, 5) parties <- sample(LETTERS, 5) dHondt(parties, votes, seats = 4) # Example: 2014 Brazilian election for the lower house in # the state of Ceara. Coalitions were leading by the # following parties: results <- c(DEM=490205, PMDB=1151547, PRB=2449440, PSB=48274, PSTU=54403, PTC=173151) dHondt(parties=names(results), votes=results, seats=19) ```