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

RE:RE:st: probelms with ado files poverty and povdeco


From   "Ngo,PT (pgr)" <P.T.Ngo@lse.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE:RE:st: probelms with ado files poverty and povdeco
Date   Tue, 2 Mar 2004 20:11:48 -0000

Thank you very much, Dr. Jenkins, for your very helpful reply.

Thi Minh



Date: Mon, 1 Mar 2004 21:32:30 +0000 (GMT)
From: Jenkins S P <stephenj@essex.ac.uk>
Subject: Re: st: problems with ado files poverty and povdeco

On Mon, 1 Mar 2004, Ngo,PT  (pgr) wrote:

> Dear Stata listers,
>
> I am facing a few problems when using the ado files poverty or povdeco.
> When I type return list, I obtain only a partial list, and when I try to retrieve the result by typing
> gen x=S_6 for example to store the headcount, an error message is returned
> _s_6 not found
>
> Could someone indicate to me what is it I am doing wrong? Basically, I
> only want to retrieve the poverty indexes in new variables using
> poverty. Similarly for povdeco.

I can only speak for -povdeco- (as its author). It is a version 5 program
(i.e. works with Stata versions 5 onwards, including 8) and so stores
results in global macros, rather than in results of form r(.). You refer
to the "saved results" that are mentioned to in the help file, by putting
a "$" in front of them, e.g. referring to $S_FGT0 for the headcount ratio.

- -poverty- is written by Philippe Van Kerm. Inspection of the help file
suggests that you should refer to saved results in the same way as I
indicate in the previous paragraph.

I note that in your code example above, you appear to be trying to
generate a /variable/ equal to a single value. You probably don't need to
do this: use a local or global macro instead.

If you want to calculate, and save, poverty index estimates for, say, each
region of a country, then one way of doing it is to create a variable to
hold the results, e.g. assuming the region variable is called region, the
income variable is called income, and the poverty line is 100:

levels region, local(reg)
ge fgt0_reg = .
ge fgt1_reg = .

foreach r of local reg {
  povdeco income if region == `r', pline(100)
  replace fgt0_reg = $FGT0 if region == `r'
  replace fgt1_reg = $FGT1 if region == `r'
}

- -povdeco income, pline(100) by(region)- would produce output showing
poverty indices for each region, but the results by region would not be
saved.

The same principles apply to getting inequality index estimates using
- -ineqdeco-

PS ensure you have the latest version of -povdeco- (version 1.3 Feb 2001)
and -ineqdeco- (version 1.6 April 2001). Get them using the -ssc- command.


Stephen Jenkins

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index