gini | R Documentation |
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.
gini(x, ...)
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. |
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.)
The generalized gini or concentration coefficient.
Markus Jantti markus.jantti@iki.fi
lambert1993incdist
inequality
, incdist
, lorenz
gini(runif(20), eta = 2)
gini(runif(20), rpois(20, 5), eta = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.