| Title: | Characterizing Observed and Expected Representation |
|---|---|
| Description: | A system for analyzing descriptive representation, especially for comparing the composition of a political body to the population it represents. Users can compute the expected degree of representation for a body under a random sampling model, the expected degree of representation variability, as well as representation scores from observed political bodies. The package is based on Gerring, Jerzak, and Oncel (2024) <doi:10.1017/S0003055423000680>. |
| Authors: | Connor Jerzak [aut, cre] (ORCID: <https://orcid.org/0000-0003-1914-8905>), John Gerring [aut] (ORCID: <https://orcid.org/0000-0001-9858-2050>), Erzen Oncel [aut] (ORCID: <https://orcid.org/0000-0001-9372-1090>) |
| Maintainer: | Connor Jerzak <[email protected]> |
| License: | GPL-3 |
| Version: | 1.1.1 |
| Built: | 2026-06-01 16:46:47 UTC |
| Source: | https://github.com/cjerzak/descriptiverepresentationcalculator-software |
Finds the degree of expected representation for any group in a political body under a random sampling model as described in Gerring, Jerzak and Oncel (2024).
ExpectedRepresentation(PopShares, BodyN, a = -0.5, b = 1)ExpectedRepresentation(PopShares, BodyN, a = -0.5, b = 1)
PopShares |
A numeric vector containing the group-level population proportions. |
BodyN |
A positive integer denoting the size of the political body in question. |
a, b
|
The |
The expected degree of representation (a scalar).
John Gerring, Connor T. Jerzak, Erzen Oncel. (2024), The Composition of Descriptive Representation, American Political Science Review, 118(2): 784-801. doi:10.1017/S0003055423000680
ObservedRepresentation for calculating representation scores from observed data.
SDRepresentation for calculating representation unexplained under the random sampling model.
ExpectedRep <- ExpectedRepresentation(PopShares = c(1/4, 2/4, 1/4), BodyN = 50) print( ExpectedRep )ExpectedRep <- ExpectedRepresentation(PopShares = c(1/4, 2/4, 1/4), BodyN = 50) print( ExpectedRep )
Finds the degree of observed representation for any group in a political body.
ObservedRepresentation(BodyMemberCharacteristics, PopShares, BodyShares, a = -0.5, b = 1)ObservedRepresentation(BodyMemberCharacteristics, PopShares, BodyShares, a = -0.5, b = 1)
BodyMemberCharacteristics |
A vector specifying the characteristics for members of a political body. |
PopShares |
A numeric vector specifying population shares of identities specified in the body-member characteristics input. The names of the entries in |
BodyShares |
(optional) A numeric vector with same structure as |
a, b
|
Parameters controlling the affine transformation for how the representation measure is summarized.
That is, |
The observed degree of representation (a scalar). By default, this quantity is the Rose Index of Proportionality.
ExpectedRepresentation for calculating expected representation scores under random sampling.
SDRepresentation for calculating representation unexplained under the random sampling model.
ObsRep <- ObservedRepresentation( BodyMemberCharacteristics = c("A","A","C","A","C","A"), PopShares = c("A"=1/4,"B"=2/4, "C"=1/4)) print( ObsRep )ObsRep <- ObservedRepresentation( BodyMemberCharacteristics = c("A","A","C","A","C","A"), PopShares = c("A"=1/4,"B"=2/4, "C"=1/4)) print( ObsRep )
Calculates the difference between observed and expected representation. Optionally standardizes this difference using the standard deviation of representation under the random sampling model.
RelativeRepresentation(BodyMemberCharacteristics, PopShares, a = -0.5, b = 1, standardize = FALSE, nMonte = 10000)RelativeRepresentation(BodyMemberCharacteristics, PopShares, a = -0.5, b = 1, standardize = FALSE, nMonte = 10000)
BodyMemberCharacteristics |
A vector specifying characteristics for each member of a political body. |
PopShares |
A numeric vector of population group proportions. Names must
correspond to identities in |
a, b
|
Parameters controlling the affine transformation of the
representation index, passed to |
standardize |
Logical. If |
nMonte |
A positive integer denoting number of Monte Carlo iterations used
for estimating the standard deviation when |
A scalar giving the difference between observed and expected
representation. If standardize = TRUE, the difference is divided by the
standard deviation under the random sampling model.
ObservedRepresentation,
ExpectedRepresentation,
SDRepresentation
Finds the residual standard deviation when using the expected representation for any group in a political body to predict observed representation as described in Gerring, Jerzak and Oncel (2024).
SDRepresentation(PopShares, BodyN, a = -0.5, b = 1, nMonte = 10000)SDRepresentation(PopShares, BodyN, a = -0.5, b = 1, nMonte = 10000)
PopShares |
A numeric vector containing the group-level population proportions. |
BodyN |
A positive integer denoting the size of the political body in question. |
a, b
|
Parameters controlling the affine transformation for how the representation measure is summarized.
That is, |
nMonte |
A positive integer denoting number of Monte Carlo iterations used to approximate the variance of representation under a random sampling model. |
A scalar summary of the amount of representation not explained by a random sampling model. More precisely, this function returns the the residual standard deviation when using the expected degree of representation to predict observed representation under a random sampling model.
John Gerring, Connor T. Jerzak, Erzen Oncel. (2024), The Composition of Descriptive Representation, American Political Science Review, 118(2): 784-801. doi:10.1017/S0003055423000680
ExpectedRepresentation for calculating expected representation scores under random sampling.
ObservedRepresentation for calculating representation scores from observed data.
SDRep <- SDRepresentation(PopShares = c(1/4, 2/4, 1/4), BodyN = 50) print( SDRep )SDRep <- SDRepresentation(PopShares = c(1/4, 2/4, 1/4), BodyN = 50) print( SDRep )