[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: inequality measures, and dynamic decomposition of inequality

From   "Stephen P. Jenkins" <>
To   <>
Subject   st: inequality measures, and dynamic decomposition of inequality
Date   Wed, 2 Jul 2008 09:51:06 +0100

Date: Tue, 1 Jul 2008 19:45:18 +0000 (GMT)
From: Lola Jackson <>
Subject: st: inequality measures, and dynamic decomposition of

Dear Statalisters,

I have recently switched over to Stata, and have 3 (related) questions
on working with inequality measures.

Firstly, i have been going through the various commands available to
compute measures of inequality (including inequal, fastgini, ineqdeco,
atkinson etc). I would like to calculate inequality by date for a
range of dates, but these inequality commands do not seem to allow a
'by' option. Is there a way of setting this command to repeat by date,
other than manually running it repeatedly and changing the date in the
command (i.e. something equivalent to 
.bys date: inequal income     or
.bys date: ineqdeco income
which are not allowed)?

Secondly, what is an efficient way of exporting the results? At the
moment I am saying 'copy table' and pasting them into an excel
worksheet...but I am sure there is a better way of doing this (I
realise that it might differ for different commands but any
suggestions would be welcome, especially for -inequal- and

Lastly, I am using -ineqdeco- to do decompositions of inequality (it
is great, and is one of the reasons why i am now working in Stata). I
want to do dynamic decompositions of inequality. I noticed from the
Statalist that in 2006
 the author of -ineqdeco-, Stephen Jenkins, mentioned that this might
be facilitated when he revises the programme. I was just wondering
whether there has since been any such developments? If not, is there
any simple guidance as to how, having run the programme separately for
each year, one would 'manually' compute the dynamic decomposition? I
have looked at Mookerjee and Shorrocks which has been mentioned
previously on Statalist, but am still struggling with how to proceed.

You have already had advice about how to cycle through subsets of the
data (think -levelsof- and -forvalues-).  Also there are examples in
the Statalist archives that you can search for showing this in action.

Second question: -ineqdeco-, -ineqdec0-, -sumdist-, and -povdeco- are
rclass programs and so leave saved results behind in r() macros. Type
-return list- after use to see full array, or read the help files. You
can then manipulate the results as you need to. Converting these to
local macros, and then write out results to a plain text using -file-
is one approach.  There is no canned approach because of the huge
diversity of user needs.

The implementation of Mookerjee & Shorrocks decompositions is
accomplished in the same way. Estimate statistics for year A and put
the required saved results into local macros; repeat for year B;
calculate the decomposition components from the local macros.

Ensure you have the latest versions of -ineqdeco- etc. Use -ssc
install <name>, replace- or -adoupdate-.  BTW -inequal- is redundant.
If you must use it, use -inequal2- from SSC instead.

Examples of the programs in action:  Jenkins, S.P. 2006. Estimation
and interpretation of measures of inequality, poverty, and social
welfare using Stata. Presentation at North American Stata Users' Group
Meetings 2006, Boston MA.

This also discusses programs like -svygei- and -svyatk- and
-svylorenz- which also provide sampling variances (std errors).

Professor Stephen P. Jenkins <>
Director, Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374.  Fax: +44 1206 873151.  
Survival Analysis using Stata: 
Downloadable papers and software:

Learn about the UK's new household panel survey, the United Kingdom
Household Longitudinal Study: 

*   For searches and help try:

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