Skip to content

Commit

Permalink
Merge branch 'CPIupdate'
Browse files Browse the repository at this point in the history
  • Loading branch information
randrescastaneda committed Feb 27, 2020
2 parents d2b8b79 + 8e7b522 commit a7a55a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pcn_master_update.ado
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ qui {

merge 1:1 CountryCode Coverqge CountryName survname year using `cdata', nogen
sort CountryCode year survname

//------------Manual fix for India
sort CountryCode Coverqge survname year
replace y = y[_n-1] if (CountryCode == "IND" & year == 2012)
replace y = 1 if (CountryCode == "IND" & year == 2011)

//------------Re format to export

reshape wide y, i(CountryCode CountryName Coverqge survname) j(year)

collapse (mean) y*, by(CountryCode CountryName Coverqge) // fix if cpi per survey change
Expand Down Expand Up @@ -597,7 +605,8 @@ qui {

putexcel save

noi disp in y "sheet(`msheet') in Master data has been update."
noi disp in y "sheet(`msheet') in Master data has been update." _n /*
*/ "{stata pcn master, load(`msheet'):Load data}"
} // end of success
} // end of qui

Expand Down

0 comments on commit a7a55a2

Please sign in to comment.