No BSD License  

Highlights from
Inequality Package

  • AtkinsonIneq(w, epsilon) The function computes the Atkinson Inequality Index for the wealth vector w associated to single individuals.
  • GiniCoeff(p, w) The function computes the Gini Coefficient for populations p associated to wealth w.
  • GiniCoeff2(p, w) The function computes a variant of the Gini Coefficient for populations p associated to wealth w.
  • TheilLIneq(w) The function computes the Theil-L Inequality Index for the wealth vector w associated to single individuals.
  • TheilTIneq(w) The function computes the Theil-T Inequality Index for the wealth vector w associated to single individuals.
  • plotLorenzCurve(p, w) The function plots the Lorenz Curve, where populations from the poorer to the richer
  • View all files

5.0

5.0 | 1 rating Rate this file 31 Downloads (last 30 days) File Size: 6.82 KB File ID: #19968
image thumbnail

Inequality Package

by Francesco Pozzi

 

18 May 2008 (Updated 08 Feb 2009)

Inequality Metrics: Gini Coefficient associated to the Lorenz Curve, Theil and Atkinson Indexes

| Watch this File

File Information
Description

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)

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Gini coefficient - population weighted

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
30 Aug 2011 martin

very good, Thank you!

30 Aug 2011 martin

I want ask a question, why I set p=rand(100,1); w=p, and the GiniCoeff(p,w) is not o. Theoratically, the answer should be zero!

Please login to add a comment or rating.
Updates
27 May 2008

Minor corrections (deleted unnecessary semicolons and brackets)

08 Feb 2009

I have made two major corrections to the functions GiniCoeff and plotLorenzCurve

Tag Activity for this File
Tag Applied By Date/Time
statistics Francesco Pozzi 22 Oct 2008 10:02:05
probability Francesco Pozzi 22 Oct 2008 10:02:05
gini Francesco Pozzi 22 Oct 2008 10:02:05
theil Francesco Pozzi 22 Oct 2008 10:02:05
lorenz curve Francesco Pozzi 22 Oct 2008 10:02:05
inequality Francesco Pozzi 22 Oct 2008 10:02:06
atkinson Francesco Pozzi 22 Oct 2008 10:02:06
concentration Francesco Pozzi 03 May 2010 06:46:14
dispersion Francesco Pozzi 03 May 2010 06:46:14
distribution Francesco Pozzi 03 May 2010 06:46:14
atkinson martin 31 Aug 2011 09:27:45

Contact us at files@mathworks.com