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

st: Problems to retrieve poverty lines after povdeco (+ some questions).


From   [email protected]
To   [email protected]
Subject   st: Problems to retrieve poverty lines after povdeco (+ some questions).
Date   Thu, 4 Nov 2004 10:41:28 -0500

Hi,

I have 3 questions:

- I am using povdeco to compute poverty lines.
I could retrieve the 3 poverty measures when I use povdeco
without the by() option, through the macros $FGT0 $FGT1 $FGT2.
But I have a problem retrieving these measures when I apply the by()
option.
The "ret li" returns only the total number of observations (r(N)).
How to retrieve the poverty rates for each value (ie the X1, X2, ... X6 below)?

povdeco pcexp [aw=wei], pl(20000)
ret li
local P0=$FGT0
local P1=$FGT1
local P2=$FGT2

povdeco pcexp [aw=wei], pl(20000) by(urbrur)

                     P0                        P1                      P2
-------------------------------------------------------------------
Urban         X1                        X2                       X3
Rural          X4                         X5                      X6

ret li
. r(N)=7890

Actually, I am getting around by doing:
povdeco pcexp [aw=wei], pl(20000) by(region)
povdeco pcexp [aw=wei] if region==1, pl(20000)
(save results in a macro)
povdeco pcexp [aw=wei] if region==2, pl(20000)
povdeco pcexp [aw=wei] if region==3, pl(20000)

etc.,
but this could be painful if we have many regions.

Could anyone help for this please?

- My second question is more general

when I tab 2 variables, how to retrieve the frequences (X1 X2 X3 X4)?
It would be nice if these values where left behind after tab (as well as the
frequences, cumulative frequencies, etc...)

tab v1 v2
                           v2
            |    0               1
 --------|-------------------------------
v1   0 |  X1            X2
       1  |  X3            X4

- My third question: I have two different results when I do the following (with
or without weights):
  bys(V1): su V2
  collapse (mean) V2, by(V1)

The means in collapse are greater (rounded?). What is happening here?

Sorry for not providing concrete examples. I am using two computers and this
one (with internet connection) does not have stata installed. So I hope you
have clear understanding of my questions.

Best regards.
Amadou.

*
*   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