irs | R Documentation |
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.
irs(P, R, perspective = "individual")
P |
Population vector |
R |
Vector for the representatives |
perspective |
Option to use the "population" perspective |
If you have categorical data (i.e. a limited number of positions), the function irs.cat
is much faster.
A vector giving the individual representation score for each individual of the population.
Didier Ruedin
Ruedin, D. (2012) Individual representation: A different approach to political representation. Representation 48(1): 115-29.
irs.cat
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.