Compute Gini coefficient from a numeric vector
Usage
calc_gini(x, w = rep(1, length(x)), na.rm = TRUE, drop_zero_and_less = TRUE)
Arguments
- x, w
numeric vectors of values and population weights of equal length
- na.rm
logical `TRUE` bu default. To omit NA values
- drop_zero_and_less
logical `TRUE` bu default to drop negarive values
and zeros