Description Usage Arguments Value Examples
View source: R/Electoral_index.R
The Gallagher's electoral disproportionality index of minimum squares uses a somewhat more elaborate formula than the previous indices (R, LH), for which it calculates the differences squared between the votes and seats, adds them up and divides the result by two and then calculates its square root. It therefore gives appropriate weight to the distortions of disproportionality. Its mathematical formula is as follows:
Gcm =sqrt(sum(Vi-Ei)^2*(1/2))
for i = 1, 2, …,n
1 | Gallagher(votes, seats)
|
votes |
It is a vector of integers, containing the votes of all the candidates. |
seats |
It is a vector of integers, containing the seats obtained by each of the candidates. |
Returns the value obtained for the index
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.