Description Usage Arguments Value Examples
View source: R/Electoral_index.R
This index is designed to study the disproportionality of those electoral systems that use the procedure of distribution of seats that has the same name (Sainte-Lague method). It should be noted that this indicator takes into account the relative difference between the seats-votes of each party, as well as that of the system as a whole. The formula used for its calculation is as follows:
SL =sqrt(sum((Vi-Ei)^2*(1/Vi))
for i = 1, 2, …,n vi>0
1 | Sainte_Lague(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 | Sainte_Lague(c(3947,3189,1971,466,345,82),c(184,99,44,10,1,0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.