Learn R Programming

lawstat (version 3.2)

gini.index: Measures of Relative Variability - Gini Index

Description

This function measures relative inequality (or relative variation) of the data using the Gini Index. NAs from the data are omitted.

Usage

gini.index(x)

Arguments

x

the input data.

Value

A list with the following numeric components.

statistic

The Gini Index of the data.

parameter

the mean difference of a set of numbers.

data.name

a character string giving the name of the data.

References

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

Gini, C. Variabilita e mutabilita (1912) Reprinted in Memorie di metodologica statistica (Ed. Pizetti E, Salvemini, T. Rome: Libreria Eredi Virgilio Veschi (1955). English translation in Metron, 2005,63,(1) 3-38

See Also

cd, j.maad, lorenz.curve

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)
gini.index(popdata[,"pop1900"])

## Measures of Relative Variability  - Gini Index
##
## data:  popdata[, "pop1900"]
## Gini Index = 0.1147, delta = 3389.765

gini.index(popdata[,"pop1972"])

## Measures of Relative Variability  - Gini Index
##
## data:  popdata[, "pop1972"]
## Gini Index = 0.0055, delta = 1297.973
# }

Run the code above in your browser using DataLab