InjusticiaM: utilities.Mathematical Injustice ( IM )

Description Usage Arguments Value Examples

View source: R/Electoral_index.R

Description

This indicator was proposed by Edward V. Huntington and measures the degree of "injustice" in an electoral system by translating the votes obtained by political parties into seats. In this sense, Edward V.Huntington defined this mathematical injustice between two parties competing in an electoral process as the difference in absolute value between the ratios of seats and votes obtained by those two political parties. That is, for each political party the ratio between seats and votes is obtained, and the mathematical injustice will be the difference in absolute value of those ratios.

If we express the above in a mathematical formula we get the following:

IM_ij=abs((ei/vi)-(ej/vj))

for i =1, 2, …,n and vi the votes of the party i and ei its seats

Usage

1
InjusticiaM(dates)

Arguments

dates

It is a data.frame object that contains the information as follows: The first column is reserved for the name of the political parties. The second column contains the votes obtained, and the third column is used for the seats obtained by that political party.

Value

The result is a matrix object, of dimension n x n, with n equal to the number of parties provided in the input data.frame. The names of the rows and columns coincide with the names of the parties provided in the input data.frame in the first column.

Examples

1
2
3
4
a<- data.frame(par=c('A','B','C','D'),
              vot=c(200,300,100,24),sea=c(3,4,1,0), stringsAsFactors = FALSE)

InjusticiaM(a)

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