Skip to content

Commit

Permalink
Merge branch 'pcn_create_urban_add' into compare_update
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlvargas committed Sep 9, 2020
2 parents a68a994 + 7086c5e commit 059cf7e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions pcn_create.ado
Original file line number Diff line number Diff line change
Expand Up @@ -307,20 +307,19 @@ qui {

cap isynth distribution, count(`country') year(`year') addvar(`addvar') server(AR) natppp /*
*/ `pause' `clear' `options'

// condition for synth
replace welfare = welfare*(365/12) //to monthly
if ("`country'"== "CHN"){
if ("`iscover'" == "R") keep if coverage == "Rural"
if ("`iscover'" == "U") keep if coverage == "Urban"
}

if (_rc) {

local status "error. loading"
local dlwnote "isynth distribution, count(`country') year(`year') addvar(`addvar') `pause' `clear' `options'"
}
else{
// condition for synth
replace welfare = welfare*(365/12) //to monthly
if ("`country'"== "CHN"){
if ("`iscover'" == "R") keep if coverage == "Rural"
if ("`iscover'" == "U") keep if coverage == "Urban"
}

gen urban = inlist(coveragetype, "urban", "Urban")
}
}
Expand Down Expand Up @@ -460,8 +459,15 @@ qui {
local cfiles "`rfile' `ufile' `wfile'"
} // end of special cases
else {
keep weight welfare
local urban ""
cap confirm variable urban
if (_rc){
keep weight welfare
local urban ""
}
else{
keep weight welfare urban
local urban "urban"
}
tempfile wfile
char _dta[cov] ""
if ("`module'" == "isynth") char _dta[cov] "`iscover'"
Expand Down

0 comments on commit 059cf7e

Please sign in to comment.