gini_coeff {graph4lg} | R Documentation |
Compute Gini coefficient from a numeric vector
Description
The function computes Gini coefficient from a numeric vector
Usage
gini_coeff(x, unbiased = TRUE)
Arguments
x |
A numeric vector with positive values |
unbiased |
A logical value indicating whether the computed coefficient is biased or not. Unbiased value are equal to n/(n-1) times the biased ones. |
Value
A numeric value corresponding to the Gini coefficient of the numeric vector
Author(s)
P. Savary
Examples
x <- c(10, 2, 5, 15)
gini <- gini_coeff(x)
[Package graph4lg version 1.8.0 Index]