[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Fast way to calculate Gini coefficients

From   "Philipp Rehm" <>
Subject   st: Fast way to calculate Gini coefficients
Date   Fri, 15 May 2009 15:29:10 +0200

Dear all,

does someone know about the fastest way to compute gini coefficients of several income variables over many sub-groups (say, 2000) of a large dataset (with several million observations)? I am using Stata 10.1 on Windows XP.

There are many user-written programs calculating gini coefficients. I have been using the following:
(1) -egen_inequal- (by Michael Lokshin and Zurab Sajaia), followed by a -collapse- (although this can be sped up by using -keep-) and
(2)-fastgini- (by Zurab Sajaia), looping over groups and collecting the results in a matrix.

Both ways of calculation take pretty long (I haven't timed them against each other). Any ideas?

Many thanks,

Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!*
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index