Political Representation in R

General Note on Using the Functions

Almost all measures in this package require two vectors as input, one for the population (citizens) and one for the representatives (legislators). These vectors should be in the form of frequency vectors, that is giving the number of observations at each position. In the following I refer to these as Z (for the citizens or population) and R (for the representatives or legislators).

The helper functions collapse and expand from the suggested package agrmt can be used to create frequency vectors.

At this stage, please refer to the help files in R for further details on the different measures of political representation.

Individual Representation Scores

Calculates individual representation scores. Use: irs(Z,R) for continuous data and irs.cat(Z,R) for categorical data. Using collapse() and then irs.cat() is significantly faster than running irs() if you have categorical data.

Gallagher index

The Gallagher index of least squares is available as Gallagher(Z,R). Use GallagherInv(Z,R) to have the values inverted so that higher values stand for greater proportionality.

Farina index

Calculates the Farina index or cosine proportionality measure. Use: Farina(Z,R).

Rose index

The Rose index is 1-LHI. Higher values stand for greater proportionality. Use: Rose(Z,R)

Rae index

Use: Rae(Z,R); or RaeInv(Z,R) to have the values inverted to give higher values for greater proportionality.

Sainte-Laguë

Use: StLague(Z,R)

The inverted Sainte-Laguë is also available: StLagueInv(Z,R)

Effective Number of Groups

Uses the Laakso and Taagepera approach to the effective number of parties. Use: neff(x).

The alternative (rarely used) measure, based on the product is available as neff.1(x).

The effective number of groups (parties) with incomplete data is also implemented. Make sure the residual category is last in the frequency vector. Use: neffIncomp(x).

Heterogeneity

Fearon's index of heterogeneity, corresponds to the Herfindahl index. Use: H(x)

Others

There are other measures included, many of which more conceptual rather than in actual use (this applies to the functions with cryptic names like scoreA, scoreB, etc. At this stage of development, refer to the built-in documentation for further information. More measures (=functions) might still be added. At this stage, the package offers a workable (and updated) alternative to the proportionality() function in the SciencesPo package (of which I was not aware until recently).

Last update 6 January 2023