index: Calculate the disproportionality indices.

View source: R/index.R

indexR Documentation

Calculate the disproportionality indices.

Description

Calculate the disproportionality indices.

Usage

index(x, ...)

## S3 method for class 'prcalc'
index(
  x,
  k = 2,
  eta = 2,
  alpha = 2,
  unit = c("l2", "l1", "joint"),
  omit_zero = TRUE,
  ...
)

Arguments

x

a prcalc object.

...

ignored

k

a parameter for Generalized Gallagher index. Default is 2.

eta

a parameter for Atkinson index. Default is 2.

alpha

a parameter for alpha-divergence. alpha must be larger than 0. Default is 2.

unit

A unit of observation. This argument is valid only when p (e.g., votes or population) and q (e.g., seats or magnitudes) are two-dimensional structures. If "l2" (abbr. of "level 2"), the disproportionality is measured based on marginal distribution of level 2, such as parties or district. If "l1" (abbr. of "level 1"), the disproportionality is measured based on marginal distribution of level 1, such as states or region. If "joint", the disproportionality is measured based on joint distribution of level 1 and 2. If you want to match the result of decompose(), use "joint". Default is "l2".

omit_zero

If TRUE, parties with 0 votes and 0 seats are ignored. Default is TRUE.

Value

a prcalc_index object.

References

  • Laakso, Markku and Rein Taagepera. 1979. ""Effective" Number of Parties: A Measure with Application to West Europe". Comparative Political Studies. 12 (1): 3–27.

  • Gallagher, Michael. 1991. "Proportionality, Disproportionality and Electoral Systems". Electoral Studies. 10: 33–51.

Examples

data(jp_upper_2019)

obj <- prcalc(jp_upper_2019, m = 50, method = "dt")

obj_index <- index(obj)
obj_index

obj_index["gallagher"] # Extract Gallagher index

JaehyunSong/PRcalc documentation built on April 17, 2024, 1:23 p.m.