gini: Gini Coefficient

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function computes the Gini coefficient for a vector of observations.

Usage

1
gini(x)

Arguments

x

a vector of observations.

Value

Gini

the Gini coefficient for the sample.

bcGini

the bias-corrected Gini coefficient for the sample.

Author(s)

Alexander Sohn

References

Cowell, F.A. (2000): Measurement of Inequality, in: Atkinson and Bourguignon (eds.), Handbook of Income Distribution, pp. 87-166, Elsevier, Amsterdam.

See Also

ineq

Examples

1
2
3
# generate vector (of incomes)
x <- c(541, 1463, 2445, 3438, 4437, 5401, 6392, 8304, 11904, 22261)
gini(x)

Example output

Loading required package: gamlss
Loading required package: splines
Loading required package: gamlss.data

Attaching package: 'gamlss.data'

The following object is masked from 'package:datasets':

    sleep

Loading required package: gamlss.dist
Loading required package: MASS
Loading required package: nlme
Loading required package: parallel
 **********   GAMLSS Version 5.1-3  ********** 
For more on GAMLSS look at http://www.gamlss.org/
Type gamlssNews() to see new features/changes/bug fixes.

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, units

$Gini
          [,1]
[1,] 0.4620911

$bcGini
          [,1]
[1,] 0.5134346

acid documentation built on May 1, 2019, 10:14 p.m.