Package on Inequality Metrics such as the Gini Coefficient associated to the Lorenz Curve, the Theil and the Atkinson Indexes.
For more references:
http://en.wikipedia.org/wiki/Lorenz_curve
http://en.wikipedia.org/wiki/Gini_coefficient
http://en.wikipedia.org/wiki/Theil_index
http://en.wikipedia.org/wiki/Atkinson_index
***************************
The zip file contains:
GiniCoeff.m
GiniCoeff2.m
plotLorenzCurve.m
TheilTIneq.m
TheilLIneq.m
AtkinsonIneq.m
***************************
Example for GiniCoeff.m:
N = 1000;
p = rand(N, 1); w = rand(N, 1);
y = GiniCoeff(p, w)
***************************
Example for GiniCoeff2.m:
N = 1000;
p = rand(N, 1); w = rand(N, 1);
y = GiniCoeff(p, w)
***************************
Example for plotLorenzCurve.m:
N = 1000;
p = rand(N, 1);
w = exp(randn(N, 1));
plotLorenzCurve(p, w)
***************************
Example for TheilTIneq.m:
N = 1000;
w = rand(N, 1);
y = TheilTIneq(w)
***************************
Example for TheilLIneq.m:
N = 1000;
w = rand(N, 1);
y = TheilLIneq(w)
***************************
Example for AtkinsonIneq.m:
N = 1000;
w = rand(N, 1);
epsilon = rand;
y = AtkinsonIneq(w, epsilon) |