irs.cat: Calculate individual representation scores for categorical...

View source: R/irs.cat.R

irs.catR Documentation

Calculate individual representation scores for categorical data.

Description

This function calculates individual representation scores based on frequency vectors. If the data are in this form, this function is much faster than the standard IRS function.

Usage

irs.cat(G, H, perspective = "individual")

Arguments

G

frequency vector for the population

H

frequency vector for the representatives

perspective

individual perspective (default) or population perspective

Details

This function calculates individual representation scores. You will need two frequency vectors, one for the population, and one for the representatives. The two frequency vectors need to be of the same length. It is possible to choose the perspective of the population, which leads to slightly different individual representation scores for small N.

Value

A vector of the same length as the frequency vector for the population. For each position, the individual representation scores are given.

Author(s)

Didier Ruedin

References

Ruedin, D. (2012) Individual representation: A different approach to political representation. Representation 48(1): 115-29.

See Also

irs

Examples

# Sample data
G <- c(1,5,10,15,3)
H <- c(0,3,0,5,1)
# Calculate individual representation scores
irs.cat(G,H)
# The representation scores for each position are:
# 5.65  2.05 -1.70 -2.95  3.75
# We have small N, so let's look at the population perspective
irs.cat(G, H, perspective = "population")
# The representation scores for each position are now:
# 4.2  1.0 -3.0 -5.0  2.6

polrep documentation built on Jan. 5, 2024, 3:01 a.m.