Statalist The Stata Listserver

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

st: RE: povdeco - unable to retrieve disaggregated results

From   "David Harrison" <[email protected]>
To   <[email protected]>
Subject   st: RE: povdeco - unable to retrieve disaggregated results
Date   Thu, 6 Apr 2006 15:55:35 +0100

I don't have -povdeco- installed, so I am just guessing here, but are
you certain that the global macros $FGT0 etc exist? If $FGT0 is empty,
then the first -replace- command will give the error "if not found
r(111)" as it would interpret the -if- as a variable name rather than an
if clause. Is this the error you got?


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of ESamman
Sent: 06 April 2006 15:16
To: [email protected]
Subject: st: povdeco - unable to retrieve disaggregated results

Dear all:

I am having trouble with a very simple program (see
below) using povdeco. When I try to retrieve the results for P0, P1, P2,
it tells me that the "if" is not valid. In the archived posts, I find
the same expression used - therefore I can't figure out why it won't
work here. I'd be grateful for any advice.
Many thanks in advance for your help.
best wishes,

local pline =2000

gen P0=.
gen P1=.
gen P2=.

levels7 sexhead, local (S)
foreach r of local S {
povdeco y_sex [w=expr] if sexhead==`r', pl(`pline')

replace P0=$FGT0 if sexhead == `r'
replace P1=$FGT1 if sexhead == `r'
replace P2=$FGT2 if sexhead == `r'	

tabdisp sexhead, c(P0, P1, P2)

drop ysexnew y_sex
drop P0 P1 P2

This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

*   For searches and help try:

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