irs: Calculate individual representation scores.

View source: R/irs.R

irsR Documentation

Calculate individual representation scores.

Description

Calculate individual representation scores based on a population vector and a vector for the representatives. For each individual, the vector needs to indicate the position.

Usage

irs(P, R, perspective = "individual")

Arguments

P

Population vector

R

Vector for the representatives

perspective

Option to use the "population" perspective

Details

If you have categorical data (i.e. a limited number of positions), the function irs.cat is much faster.

Value

A vector giving the individual representation score for each individual of the population.

Author(s)

Didier Ruedin

References

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

See Also

irs.cat

Examples

# Sample data:
P <- c(1,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5)
R <- c(2,2,2,4,4,4,4,4,5)
# Calculate IRS:
irs(P,R)
# Gives IRS: a vector starting with: 0.04, 0.07, and ending with 0.08

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