@@ -148,7 +148,7 @@ set maxvar 8000
148148// set directories
149149* These paths correspond to the folders where the raw data files are located
150150* and where the created data and final data will be stored.
151- global directory " ../.."
151+ global directory " ../.."
152152global Uganda_NPS_W2_raw_data " $directory/Uganda UNPS/Uganda UNPS Wave 2/Raw DTA Files"
153153global Uganda_NPS_W2_created_data " $directory/Uganda UNPS/Uganda UNPS Wave 2/Final DTA Files/created_data"
154154global Uganda_NPS_W2_final_data " $directory/Uganda UNPS/Uganda UNPS Wave 2/Final DTA Files/final_data"
@@ -3827,15 +3827,15 @@ save "${Uganda_NPS_W2_created_data}/Uganda_NPS_W2_shannon_diversity_index.dta",
38273827********************************************************************************
38283828 * CONSUMPTION *
38293829********************************************************************************
3830- use " ${Uganda_NPS_W2_raw_data}/UNPS 2011-12 Consumption Aggregate .dta" , clear
3830+ use " ${Uganda_NPS_W2_raw_data}/pov2010_11 .dta" , clear
38313831*gen nrrexp = cpexp30 * (100.000000 / 66.67894615) // (CPI 2010&11 / CPI 2005&06) 2010/2005
38323832gen nrrexp = cpexp30 * (116.5643496 / 71.55362795) // (CPI 2010&11 / CPI 2005&06) 2011/2006
38333833ren nrrexp total_cons
38343834*ren cpexp30 total_cons
38353835ren equiv adulteq
38363836ren welfare peraeq_cons
3837- ren HHID hhid
3838- tostring hhid, format(%18.0f) replace
3837+ ren hh hhid
3838+ tostring hhid district , format(%18.0f) replace
38393839merge 1:1 hhid using " ${Uganda_NPS_W2_created_data}/Uganda_NPS_W2_hhsize.dta" , nogen keep(1 3)
38403840gen percapita_cons = (total_cons / hh_members)
38413841gen daily_peraeq_cons = peraeq_cons/30
@@ -3846,13 +3846,13 @@ lab var percapita_cons "Consumption per capita, in 05/06 prices, spatially and t
38463846lab var daily_peraeq_cons " Daily consumption per adult equivalent, in 05/06 prices, spatially and temporally adjusted in 11/12"
38473847lab var daily_percap_cons " Daily consumption per capita, in 05/06 prices, spatially and temporally adjusted in 11/12"
38483848
3849- keep hhid total_cons peraeq_cons percapita_cons daily_peraeq_cons daily_percap_cons adulteq
3849+ keep hhid poor total_cons peraeq_cons percapita_cons daily_peraeq_cons daily_percap_cons adulteq
38503850save " ${Uganda_NPS_W2_created_data}/Uganda_NPS_W2_consumption.dta" , replace
38513851
38523852**We create an adulteq dataset for summary statistics sections
3853- use " ${Uganda_NPS_W2_raw_data}/UNPS 2011-12 Consumption Aggregate.dta " , clear
3853+ use " ${Uganda_NPS_W2_raw_data}/pov2010_11 " , clear
38543854rename equiv adulteq
3855- rename HHID hhid
3855+ rename hh hhid
38563856keep hhid adulteq
38573857tostring hhid, format(%18.0f) replace
38583858save " ${Uganda_NPS_W2_created_data}/Uganda_NPS_W2_hh_adulteq.dta" , replace
@@ -3862,18 +3862,15 @@ save "${Uganda_NPS_W2_created_data}/Uganda_NPS_W2_hh_adulteq.dta", replace
38623862********************************************************************************
38633863
38643864use " ${Uganda_NPS_W2_raw_data}/GSEC15B" , clear
3865- rename hh HHID
38663865rename h15bq5 fd_home
38673866rename h15bq7 fd_awayhome
38683867rename h15bq9 fd_ownp
38693868rename h15bq11 fd_gift
38703869egen food_total = rowtotal(fd* )
3871- collapse (sum) fd* food_total, by(HHID)
3872- duplicates report HHID
3873- tostring HHID, format(%18.0f) replace
3874- merge 1:1 HHID using " ${Uganda_NPS_W2_raw_data}/UNPS 2011-12 Consumption Aggregate.dta" , nogen keep(1 3)
3875- ren HHID hhid
3876- tostring hhid, format(%18.0f) replace
3870+ collapse (sum) fd* food_total, by(hh)
3871+ merge 1:1 hh using " ${Uganda_NPS_W2_raw_data}/pov2010_11.dta" , nogen keep(1 3)
3872+ ren hh hhid
3873+ tostring hhid district, format(%18.0f) replace
38773874merge 1:1 hhid using " ${Uganda_NPS_W2_created_data}/Uganda_NPS_W2_hhsize.dta" , nogen keep(1 3)
38783875drop if equiv == .
38793876recode fd* food_total (0= .)
@@ -4891,13 +4888,7 @@ la var poverty_under_215 "Household per-capita consumption is below $2.15 in 201
48914888gen poverty_under_300 = (daily_percap_cons < $Uganda_NPS_W2_poverty_300)
48924889la var poverty_under_300 " Household per-capita consumption is below $3.00 in 2021 $ PPP"
48934890
4894- rename hhid HHID
4895- *We merge the national poverty line provided by the World bank
4896- tostring HHID, format(%18.0f) replace
4897- merge 1:1 HHID using " ${Uganda_NPS_W2_raw_data}/UNPS 2011-12 Consumption Aggregate.dta" , keep(1 3) nogen
4898- *gen poverty_under_npl = daily_percap_cons < $Nigeria_GHS_W1_poverty_nbs
48994891rename poor poverty_under_npl
4900- rename HHID hhid
49014892la var poverty_under_npl " Household per-capita consumption is below national poverty line in 05/06 PPP prices"
49024893
49034894*generating clusterid and strataid
0 commit comments