gini: Generalized gini or concentration coefficient

View source: R/gini.R

giniR Documentation

Generalized gini or concentration coefficient

Description

This function estimates the generalized Gini coefficient or, if an other variable is used for ordering, the concentration coefficient of a variable with respect to the ordering variable. For the generalizing parameter eta = 2, this yields the ordinary Gini coefficient.

Usage

gini(x, ...)

Arguments

x

a numerical vector whose index is to be estimated.

object

an incdist object.

w

an optional vector of non-negative integer values weights.

eta

the generalization parameter. For the default value of eta = 2, gini() yields the ordinary gini coefficient.

na.rm

a logical indicating whether NA's should removed.

data

the data frame where the variables are found.

ranked

an optional variable whch defines the ranking. If not the default, the resulting index is a concentration coefficient.

Details

The function gini.default works on vectors, whereas the gini.incdist function works on incdist objects (and currently produces lots of output, much of which is unlikely to be useful.)

Value

The generalized gini or concentration coefficient.

Author(s)

Markus Jantti markus.jantti@iki.fi

References

\insertRef

lambert1993incdist

See Also

inequality, incdist, lorenz

Examples


gini(runif(20), eta = 2)
gini(runif(20), rpois(20, 5), eta = 2)


mjantti/incdist documentation built on Aug. 23, 2023, 5:33 p.m.