Skip to content

Commit

Permalink
fix conditions in loading master in pcn_create
Browse files Browse the repository at this point in the history
  • Loading branch information
randrescastaneda committed Mar 5, 2020
1 parent 5ae8263 commit 960fcdc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pcn_create.ado
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,24 @@ qui {

// PPPs
pcn master, load(ppp) qui
keep if countrycode == "`country'" & coveragetype != "National"
gen urban = coveragetype == "Urban"
keep if countrycode == "`country'" & lower(coveragetype) != "national"
gen urban = lower(coveragetype) == "urban"
keep urban ppp2011
tempfile ppp
save `ppp'

// Population
pcn master, load(population) qui
keep if countrycode=="`country'" & coveragetype!="National" & year==`year'
gen urban = coveragetype=="Urban"
keep if countrycode=="`country'" & lower(coveragetype) != "national" & year==`year'
gen urban = lower(coveragetype) == "urban"
keep urban population
tempfile pop
save `pop'

// CPI
pcn master, load(cpi) qui
keep if countrycode=="`country'" & coveragetype!="National" & year==`year'
gen urban = coveragetype=="urban"
keep if countrycode=="`country'" & lower(coveragetype) != "national" & year==`year'
gen urban = lower(coveragetype) == "urban"
keep urban cpi
tempfile cpi
save `cpi'
Expand All @@ -204,7 +204,6 @@ qui {
}

label var welfare "Welfare in 2011 USD PPP per day"
keep welfare weight urban

char _dta[cov] "N"
tempfile wfile
Expand Down

0 comments on commit 960fcdc

Please sign in to comment.