Learn R Programming

lawstat (version 3.2)

cd: Coefficient of Dispersion -- A Measure of Relative Variability

Description

This function measures relative inequality (or relative variation) of the data. Coefficient of Dispersion (CD) is the ratio of the Average Absolute Deviation from the Median (MAAD) to the Median of the data. NAs from the data are omitted.

Usage

cd(x)

Arguments

x

a numeric vector of data values.

Value

A list with the following numeric components.

statistic

the coefficient of dispersion.

data.name

a character string giving the name of the data.

References

Bonett, D. G. and Seier, E. (2005). Confidence interval for a coefficient of dispersion in nonnormal distributions. Biometrical Journal 48(1): 144--148.

Gastwirth, J. L. (1988). Statistical Reasoning in Law and Public Policy Vol 1. Academic Press, Boston, Toronto.

See Also

gini.index, j.maad

Examples

Run this code
# NOT RUN {
## The Baker v. Carr Case: one-person-one-vote decision. 
## Measure of Relative Inequality of Population data in 33 districts 
## of the Tennessee Legislature in 1900 and 1972. See 
## popdata (see Gastwirth, 1988).

data(popdata)
cd(popdata[,"pop1900"])

## Measures of Relative Variability  - Coefficient of Dispersion
##
## data:  popdata[, "pop1900"]
## Coefficient of Dispersion = 0.1673

cd(popdata[,"pop1972"])

## Measures of Relative Variability  - Coefficient of Dispersion
##
## data:  popdata[, "pop1972"]
## Coefficient of Dispersion = 0.0081
# }

Run the code above in your browser using DataLab