Learn R Programming

lawstat (version 3.4)

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

Description

Measure of relative inequality (or relative variation) of the data. Coefficient of dispersion (CD) is the ratio of the mean absolute deviation from the median (MAAD) to the median of the data. NAs from the data are omitted. See Gastwirth_1988v1;textuallawstat and Bonett_Seier_2006;textuallawstat.

Usage

cd(x)

Value

The coefficient of dispersion.

Arguments

x

a numeric vector of data values.

Author

Wallace Hui, Yulia R. Gel, Joseph L. Gastwirth, Weiwen Miao

References

See Also

gini.index, j.maad

Examples

Run this code
## 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"])
cd(popdata[,"pop1972"])

Run the code above in your browser using DataLab