Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: problems with using ineqdeco to calculate inequality measures


From   Jenkins S P <[email protected]>
To   [email protected]
Subject   Re: st: problems with using ineqdeco to calculate inequality measures
Date   Wed, 30 Apr 2003 22:39:07 +0100 (BST)

On Wed, 30 Apr 2003, Emma Samman wrote:

> I wondered if any ineqdeco users could help with the following problems:
>
> I have some large household survey-based datasets (about 55,000
> observations unweighted, 5 million weighted). These data are broken down
> into 52 subgroups, and designed to be representative at the level of
> each subgroup.
>
> When running ineqdeco 2 unexpected things occur:
>
> 1. it refuses to calculate General Entropy measures for the dataset
> taken as a whole (though it does so for between and within group
> components).  When I don't specify any decomposition, it still will not
> calculate measures for dataset as a whole (though inequal7, for
> instance, will).
>
> 2. it leaves out several subgroups in carrying out the decompositions -
> (about 15 to 17, depending on the dataset used) - and I can't seem to
> find any systematic reason for this (the sizes of the subgroups omitted
> are equal to those included weighted or unweighted). The same problem
> occurs when the program is run with and without weights.

My conjecture is that the # obs, and presence of zero values, are red
herrings.
Please check that you have the latest versions of these programs. They
were written for version 5, and changes introduced in version 7 led to
problems -- which may be what you are seeing. The revised versions have
long been archived at SSC-IDEAS, and are available via the -ssc- command.

To check your version:

. which ineqdeco
c:\ado\stbplus\i\ineqdeco.ado
*! version 1.0.1 Stephen P. Jenkins, April 1998   STB-48 sg104
*! version 1.6 April 2001 (made compatible with Stata 7)
*! Inequality indices and decomposition by population subgroups
*! Syntax: ineqdeco <var> [[w=weight] if <exp> in <range>],
*!              [by(<groupvar>) w s]

. which ineqdec0
c:\ado\stbplus\i\ineqdec0.ado
*! version 1.0.0 Stephen P. Jenkins, April 1998   STB-48 sg104
*! version 1.6 April 2001 (made compatible with Stata 7)
*! Inequality indices and decomposition by population subgroups
*! Stripped-down version of -ineqdeco- which handles zero and
*! negative incomes (and thence output is only Gini and I2)

To update, -ssc install ineqdeco, replace-, -ssc install ineqdec0,
replace-

While you are on the line, ...
Some users have asked me about accessing the saved results, cited in the
help file to -ineqdeco-:
S_9010, S_7525          Percentile ratios p90/p10, p75/p25
S_im1, S_i0, S_i1, S_i2 GE(a), for a = -1, 0, 1, 2
S_gini                  Gini coefficient
S_ahalf, S_i1, S_a2     A(e), for e = 0.5, 1, 2

As -ineqdeco- (and -ineqdec0-) are version 5 programs, these results are
saved as global macros (not as r(.) as in more modern versions). You refer
to them, as with all globals, by putting a "$" in front, e.g. $S_gini.
This can be used to bootstrap the inequality estimates.
Alternatively, you could use the user-written program -ineqerr- :
[use -findit-!]

STB-51  sg115  . . . . . . Bootstrap standard errors for indices of
inequality
        (help ineqerr if installed)  . . . . D. Jolliffe and B.
Krushelnytskyy
        9/99    pp.28--32; STB Reprints Vol 9, pp.191--196
        provides the Gini, Theil, and variance of logs indices of
        inequality along with bootstrap estimates of their sampling
        variances

Please let me (and the list) know if the updating of the programs solves
your problems

Stephen
(author of -ineqdeco-, -ineqdec0-, -ineqfac-, -sumdist-, etc.)
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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