Gallagher: Gallagher's disproportionality index of minimum squares -...

Description Usage Arguments Value Examples

View source: R/Electoral_index.R

Description

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

Usage

1
Gallagher(votes, seats)

Arguments

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.

Value

Returns the value obtained for the index

Examples

1
2
Rae(c(3947,3189,1971,466,345,82),c(184,99,44,10,1,0))
Gallagher(c(3947,3189,1971,466,345,82),c(184,99,44,10,1,0))

Relectoral documentation built on July 2, 2020, 2:31 a.m.