Learn R Programming

DescriptiveRepresentationCalculator (version 1.1.1)

RelativeRepresentation: Compute relative representation compared to random sampling

Description

Calculates the difference between observed and expected representation. Optionally standardizes this difference using the standard deviation of representation under the random sampling model.

Usage

RelativeRepresentation(BodyMemberCharacteristics,
                       PopShares,
                       a = -0.5, b = 1,
                       standardize = FALSE,
                       nMonte = 10000)

Value

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.

Arguments

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 BodyMemberCharacteristics.

a, b

Parameters controlling the affine transformation of the representation index, passed to ObservedRepresentation and ExpectedRepresentation.

standardize

Logical. If TRUE, the difference between observed and expected representation is divided by the standard deviation of representation under random sampling.

nMonte

A positive integer denoting number of Monte Carlo iterations used for estimating the standard deviation when standardize = TRUE.

See Also

ObservedRepresentation, ExpectedRepresentation, SDRepresentation