Compute gini index from Lorenz Quadratic fit
Source:R/gd_compute_pip_stats_lq.R
gd_compute_gini_lq.Rd
gd_compute_gini_lq()
computes the gini index from a Lorenz Quadratic fit.
Key values is a vector that can be set to fit the follwing formulas:
e = -(A + B + C + 1): condition for the curve to go through
(1, 1).
m = (B^2) - (4 * A). m < 0: condition for the curve to be
an ellipse (m is called alpha in paper).
n = (2 * B * e) - (4 * C). n is called Beta in paper
r = (n^2) - (4 * m * e^2). r is called K in paper.
Arguments
- A
numeric: Lorenz curve coefficient. Output of
regres_lq()$coef[1]
.- B
numeric: Lorenz curve coefficient. Output of
regres_lq()$coef[2]
.- C
numeric: Lorenz curve coefficient. Output of
regres_lq()$coef[3]
.- key_values
vector with (e,m,n,r)
References
Datt, G. 1998. "Computational Tools For Poverty Measurement And Analysis". FCND Discussion Paper 50. World Bank, Washington, DC.