Compute a weighted Gini coefficient by integrating the
generalized Lorenz curve.
Usage
compute_gini(dep_var, weights)
Value
The numeric value indicating the weighted Gini coefficient of the the dependent variable.
Arguments
dep_var
values of a non-negative continuous variable
weights
numeric vector of non-negative observation weights, hence of same length as dep_var.
References
Firpo, Sergio P., Nicole M. Fortin, and Thomas Lemieux. 2018. “Decomposing Wage Distributions Using Recentered
Influence Function Regressions.” Econometrics 6(2), 28.