******************************************************************************** /* Citation: Oxford Poverty and Human Development Initiative (OPHI), University of Oxford. 2020 Global Multidimensional Poverty Index - Botswana MTHS 2015-16. [STATA do-file]. Available from OPHI website: http://ophi.org.uk/ For further queries, contact: ophi@qeh.ox.ac.uk */ ******************************************************************************** clear all set more off set maxvar 10000 set mem 500m *** Working Folder Path *** global path_in "../rdta/Botswana BMTHS 2015-16" global path_out "cdta" global path_ado "ado" ******************************************************************************** *** BOTSWANA MTHS 2015-16 *** ******************************************************************************** /* Note on microdata: The Botswana Multi Topic Household Survey (BMTHS) microdata is not available on the public platform. The microdata was provided by Botswana’s National Bureau of Statistics (NBS) through a joint agreement between OPHI and NBS solely for computing and publishing the global MPI aggregates. Note on nutrition: Anthropometric data was collected from individuals up to the age of 17 years. */ ******************************************************************************** *** Step 1.1: Data preparation *** Generating anthropometric measures *** Generating individual identifier ******************************************************************************** ******************************************************************************** *** Step 1.1 Children 0-60 months / under 5 years *** Underweight, Stunting & Wasting ******************************************************************************** /*The purpose of step 1.1 is to compute anthropometric measures for children 0-60 months.*/ //Individual level data use "$path_in/Individuals_01_02_2018_.dta" //24,720 individuals. Matches report (p.4) //Drop non-usual household members desc q01_05 codebook q01_05 list hhid q01_05 if q01_05!=1 clonevar resident = q01_05 keep if resident==1 | hhid==34011 | hhid==37901 | hhid==57304 count //24,708 individuals //Generate household id codebook hhid gen double hh_id = hhid format hh_id %20.0g label var hh_id "Household ID" sort hh_id, stable //Generate individual id gen double ind_id = hhid*100 + idcode format ind_id %20.0g label var ind_id "Individual ID" /*Given the mismatch between age, age months and eligibility for measurement, a number of variables were applied to identify children 60 months and younger. Such approach should be considered carefully and only applied after reviewing the observations case by case. */ //Identify children 6-17 from children under 5 (<=60 months) tab q16_01, miss //9,632 children under 18 eligible for measure tab q16_02 if q16_01==1, miss //3,075 children whose age is under 5 years count if q16_05<=60 //2,857 children whose has information on age in months: <=60 months count if q16_01==1 & q16_02!=1 //6,557 children whose age is 5 to under 18 years gen child_eligible = 0 replace child_eligible = 1 if age<=17 | q16_01==1 | q16_05<=60 tab child_eligible, miss /*All possible children who are up to the age of 17 years and may have been measured */ //Identify all possible children under 5 (<=60 months) count if q16_02==1 | (q16_02==2 & q16_05<=60) | (q01_03<5 & q16_01==. & q16_08<.) gen child_CH = 1 if (q16_02==1 | (q16_02==2 & q16_05<=60) | (q01_03<5 & q16_01==. & q16_08<.)) tab child_CH,miss //Identify all possible children between 6-17 years gen teen_CH = 1 if q16_01==1 & q16_02>1 replace teen_CH = . if q16_02==2 & q16_05<=60 replace teen_CH = 1 if q16_01==2 & q16_02==2 & q01_03<18 replace teen_CH = 1 if (q01_03>=5 & q01_03<18 & q16_01==. & q16_08<.) tab teen_CH, miss /*Identify all possible children under 5 (<=60 months) who are not between 6-17 years */ replace child_CH = 1 if child_eligible==1 & child_CH==. & teen_CH==. & q01_03<5 tab child_CH, miss /*Identify all possible children between 6-17 years who are not under 5 (<=60 months)*/ replace teen_CH = 1 if child_eligible==1 & child_CH==. & teen_CH==. & q01_03>=5 & q01_03<=17 tab teen_CH, miss keep if child_CH ==1 count //3,112 children under 5 years drop age gen age = q01_03 tab age, miss *** Variable: AGE *** codebook q16_05, tab (9999) count if q16_05>60 & q16_05<. //34 individuals with age above 60 months *list hh_id ind_id if q16_05>60 & q16_05<. clonevar age_months = q16_05 *replace age_months = . if q16_05>60 & q16_05<. //Replace missing age in months using their age information replace age_months = 6 if age==0 & age_months==. replace age_months = 18 if age==1 & age_months==. replace age_months = 30 if age==2 & age_months==. replace age_months = 42 if age==3 & age_months==. replace age_months = 54 if age==4 & age_months==. replace age_months = 60 if age==5 & age_months==. sum age_months *** Variable: AGE UNIT *** gen str6 ageunit = "months" lab var ageunit "Months" *** Variable: SEX *** codebook sex, tab (9) //"1" for male ;"2" for female clonevar gender = sex tab gender *** Variable: BODY WEIGHT (KILOGRAMS) *** codebook q16_09, tab (999) clonevar weight = q16_09 replace weight = . if q16_09>=300 //All missing values or out of range are replaced as "." tab q16_10 q16_09 if q16_09>=300 | q16_09==., miss sum weight *** Variable: HEIGHT (CENTIMETERS) codebook q16_08, tab (999) clonevar height = q16_08 replace height = . if q16_08>=300 //All missing values or out of range are replaced as "." tab q16_10 q16_08 if q16_08>=300 | q16_08==., miss sum height *** Variable: MEASURED STANDING/LYING DOWN gen measure = "l" if q16_06==2 replace measure = "h" if q16_06==1 replace measure = " " if (q16_06==0 | q16_06==.) *** Variable: OEDEMA *** gen oedema = "n" *** Variable: SAMPLING WEIGHT *** /* We don't require individual weight to compute the z-scores of a child. So we assume all children in the sample have the same weight */ gen sw = 1 *** Indicate to STATA where the igrowup_restricted.ado file is stored: adopath + "$path_ado/igrowup_stata" gen str100 reflib = "$path_ado/igrowup_stata" lab var reflib "Directory of reference tables" gen str100 datalib = "$path_out" lab var datalib "Directory for datafiles" gen str30 datalab = "children_nutri_bwa" lab var datalab "Working file" igrowup_restricted reflib datalib datalab gender age_months /// ageunit weight height measure oedema sw /*We now turn to using the dta file that was created and that contains the calculated z-scores to create the child nutrition variables following WHO standards */ use "$path_out/children_nutri_bwa_z_rc.dta", clear *** Standard MPI indicator *** //Takes value 1 if the child is under 2 stdev below the median & 0 otherwise gen underweight = (_zwei < -2.0) replace underweight = . if _zwei == . | _fwei==1 lab var underweight "Child is undernourished (weight-for-age) 2sd - WHO" tab underweight, miss gen stunting = (_zlen < -2.0) replace stunting = . if _zlen == . | _flen==1 lab var stunting "Child is stunted (length/height-for-age) 2sd - WHO" tab stunting, miss gen wasting = (_zwfl < - 2.0) replace wasting = . if _zwfl == . | _fwfl == 1 lab var wasting "Child is wasted (weight-for-length/height) 2sd - WHO" tab wasting, miss *** Destitution indicator *** //Takes value 1 if the child is under 3 stdev below the median & 0 otherwise gen underweight_u = (_zwei < -3.0) replace underweight_u = . if _zwei == . | _fwei==1 lab var underweight_u "Child is undernourished (weight-for-age) 3sd - WHO" gen stunting_u = (_zlen < -3.0) replace stunting_u = . if _zlen == . | _flen==1 lab var stunting_u "Child is stunted (length/height-for-age) 3sd - WHO" gen wasting_u = (_zwfl < - 3.0) replace wasting_u = . if _zwfl == . | _fwfl == 1 lab var wasting_u "Child is wasted (weight-for-length/height) 3sd - WHO" count if _fwei==1 | _flen==1 /*Botswana MTHS 2015-16: 142 children were replaced as missing because they have extreme z-scores which are biologically implausible. */ count //Botswana BMTHS 2015-16: the number of eligible children is 3,112 //Retain relevant variables: keep ind_id child_CH underweight* stunting* wasting* order ind_id child_CH underweight* stunting* wasting* sort ind_id save "$path_out/BWA15-16_CH.dta", replace //Erase files from folder: erase "$path_out/children_nutri_bwa_z_rc.xls" erase "$path_out/children_nutri_bwa_prev_rc.xls" erase "$path_out/children_nutri_bwa_z_rc.dta" ******************************************************************************** *** Step 1.2 Children 6-17 years *** BMI-for-age ******************************************************************************** /*The purpose of step 1.2 is to compute BMI-for-age measure for children 6-17 years.*/ //Individual level data use "$path_in/Individuals_01_02_2018_.dta" //24,720 individuals. Matches report (p.4) //Drop non-usual household members desc q01_05 codebook q01_05 list hhid q01_05 if q01_05!=1 clonevar resident = q01_05 keep if resident==1 | hhid==34011 | hhid==37901 | hhid==57304 count //Generate household id codebook hhid gen double hh_id = hhid format hh_id %20.0g label var hh_id "Household ID" sort hh_id, stable //Generate individual id gen double ind_id = hhid*100 + idcode format ind_id %20.0g label var ind_id "Individual ID" /*Given the mismatch between age, age months and eligibility for measurement, a number of variables were applied to identify children 6-17 years. Such approach should be considered carefully and only applied after reviewing the observations case by case. */ //Identify children 6-17 from children under 5 (<=60 months) tab q16_01, miss //9,632 children under 18 eligible for measure tab q16_02 if q16_01==1, miss //3,075 children whose age is under 5 years count if q16_05<=60 //2,857 children whose has information on age in months: <=60 months count if q16_01==1 & q16_02!=1 //6,557 children whose age is 5 to under 18 years gen child_eligible = 0 replace child_eligible = 1 if age<=17 | q16_01==1 | q16_05<=60 tab child_eligible, miss /*All possible children who are up to the age of 17 years and may have been measured */ //Identify all possible children under 5 (<=60 months) count if q16_02==1 | (q16_02==2 & q16_05<=60) | (q01_03<5 & q16_01==. & q16_08<.) gen child_CH = 1 if (q16_02==1 | (q16_02==2 & q16_05<=60) | (q01_03<5 & q16_01==. & q16_08<.)) tab child_CH,miss //Identify all possible children between 6-17 years gen teen_CH = 1 if q16_01==1 & q16_02>1 replace teen_CH = . if q16_02==2 & q16_05<=60 replace teen_CH = 1 if q16_01==2 & q16_02==2 & q01_03<18 replace teen_CH = 1 if (q01_03>=5 & q01_03<18 & q16_01==. & q16_08<.) tab teen_CH, miss /*Identify all possible children under 5 (<=60 months) who are not between 6-17 years */ replace child_CH = 1 if child_eligible==1 & child_CH==. & teen_CH==. & q01_03<5 tab child_CH, miss /*Identify all possible children between 6-17 years who are not under 5 (<=60 months)*/ replace teen_CH = 1 if child_eligible==1 & child_CH==. & teen_CH==. & q01_03>=5 & q01_03<=17 tab teen_CH, miss keep if teen_CH==1 count //6,602 children 6-17 years tab q01_03, miss count if q01_03>17 count if q01_03<6 /*It seems like 3 individuals are older than 17 years, and 594 are younger than 6 years but are listed as older than 5 years following the q16_02 variable.*/ ***Variables required to calculate the z-scores to produce BMI-for-age: *** Variable: AGE *** /*According to the questionnaire, age in months was not collected from this age group */ tab q16_05, miss drop age gen age = q01_03 *** Variable: AGE UNIT *** gen str6 ageunit = "years" lab var ageunit "Years" *** Variable: SEX *** codebook sex, tab (9) //"1" for male ;"2" for female clonevar gender = sex tab gender *** Variable: BODY WEIGHT (KILOGRAMS) *** codebook q16_09, tab (9999) clonevar weight = q16_09 replace weight = . if q16_09>=300 //All missing values or out of range are replaced as "." tab q16_10 q16_09 if q16_09>=300 | q16_09==., miss sum weight *** Variable: HEIGHT (CENTIMETERS) codebook q16_08, tab (9999) clonevar height = q16_08 replace height = . if q16_08>=300 //All missing values or out of range are replaced as "." tab q16_10 q16_08 if q16_08>=300 | q16_08==., miss sum height *** Variable: OEDEMA // We assume all individuals in the sample have no oedema gen oedema = "n" tab oedema *** Variable: SAMPLING WEIGHT *** /* We don't require individual weight to compute the z-scores. We assume all individuals in the sample have the same sample weight */ gen sw = 1 sum sw *** Indicate to STATA where the igrowup_restricted.ado file is stored: adopath + "$path_ado/who2007_stata" gen str100 reflib = "$path_ado/who2007_stata" lab var reflib "Directory of reference tables" gen str100 datalib = "$path_out" lab var datalib "Directory for datafiles" gen str30 datalab = "teen_nutri_bwa" lab var datalab "Working file" /*We now run the command to calculate the z-scores with the adofile */ *who2007 reflib datalib datalab gender age_month ageunit weight height oedema sw who2007 reflib datalib datalab gender age ageunit weight height oedema sw /*We now turn to using the dta file that was created and that contains the calculated z-scores to compute BMI-for-age*/ use "$path_out/teen_nutri_bwa_z.dta", clear gen z_bmi = _zbfa replace z_bmi = . if _fbfa==1 /*Botswana MTHS 2015-16: 178 children 6-17 years were replaced as missing because they have extreme z-scores which are biologically implausible. */ lab var z_bmi "z-score bmi-for-age WHO" *** Standard MPI indicator *** /*Takes value 1 if BMI-for-age is under 2 stdev below the median & 0 otherwise */ gen low_bmiage = (z_bmi < -2.0) replace low_bmiage = . if z_bmi==. lab var low_bmiage "Teenage low bmi 2sd - WHO" *** Destitution indicator *** /*Takes value 1 if BMI-for-age is under 3 stdev below the median & 0 otherwise */ gen low_bmiage_u = (z_bmi < -3.0) replace low_bmiage_u = . if z_bmi==. lab var low_bmiage_u "Teenage very low bmi 3sd - WHO" tab low_bmiage, miss tab low_bmiage_u, miss //Retain relevant variables: keep ind_id teen_CH low_bmiage* order ind_id teen_CH low_bmiage* sort ind_id save "$path_out/BWA15-16_TEEN.dta", replace //Erase files from folder: erase "$path_out/teen_nutri_bwa_z.xls" erase "$path_out/teen_nutri_bwa_prev.xls" erase "$path_out/teen_nutri_bwa_z.dta" ******************************************************************************** *** Step 1.3 DATA MERGING ******************************************************************************** //Use individual-level data use "$path_in/Individuals_01_02_2018_.dta" //Generate household id gen double hh_id = hhid format hh_id %20.0g label var hh_id "Household ID" sort hh_id //Generate individual id gen double ind_id = hhid*100 + idcode format ind_id %20.0g label var ind_id "Individual ID" /* by hh_id: gen double id = _n gen double ind_id = hh_id*100 + id format ind_id %20.0g label var ind_id "Individual ID" drop id */ sort hh_id ind_id //Drop non-usual household members desc q01_05 codebook q01_05 list hhid q01_05 if q01_05!=1 clonevar resident = q01_05 keep if resident==1 | hhid==34011 | hhid==37901 | hhid==57304 /*A household should have at least 1 usual resident. However, in three of the households above, hhid=34011 (1 member), hhid=37901 (4 members) and hhid=57304 (1 member), all members are recorded as non-usual members. We assume this is not possible, hence have retained these 3 households (6 observations).*/ //Merge data computed for children under 5 merge 1:1 ind_id using "$path_out/BWA15-16_CH.dta" drop _merge //Merge data computed for children 5 -17 merge 1:1 ind_id using "$path_out/BWA15-16_TEEN.dta" drop _merge //Merge household-level data destring ea, replace destring stratum, replace destring district, replace merge m:1 hhid using "$path_in/anon_mas_01_hhold_09_02_2018.dta" drop _merge drop q09_33_* //Merge household-level data (with assets) destring ea, replace destring stratum, replace destring district, replace merge m:1 hhid using "$path_in/BMTHS_Household_Level_FINAL_OPHI.dta" drop _merge count //24,708 individuals ******************************************************************************** *** Step 1.4 CONTROL VARIABLES ******************************************************************************** /* Households are identified as having 'no eligible' members if there are no applicable population, that is, children 0-17 years for nutrition. */ *** No eligible women *** for child mortality indicator ***************************************** //Not relevant for Botswana MTHS 2015-16 gen no_fem_eligible = . lab var no_fem_eligible "Household has no eligible women" *** No eligible men *** for child mortality indicator ***************************************** //Not relevant for Botswana MTHS 2015-16 gen no_male_eligible = . lab var no_male_eligible "Household has no eligible man for interview" *** No eligible children (<=60 months) *** for child nutrition indicator ***************************************** gen child_eligible = (child_CH==1) bysort hh_id: egen hh_n_children_eligible = sum(child_eligible) //Number of eligible children for anthropometrics gen no_child_eligible = (hh_n_children_eligible==0) //Takes value 1 if there were no eligible children for anthropometrics lab var no_child_eligible "Household has no children eligible for anthropometric" drop child_eligible hh_n_children_eligible tab no_child_eligible, miss *** No eligible young children 6-17 years *** for bmi-for-age indicator ***************************************** gen teen_eligible = (teen_CH==1) bysort hh_id: egen hh_n_teen_eligible = sum(teen_eligible) //Number of eligible young children for anthropometrics gen no_teen_eligible = (hh_n_teen_eligible==0) //Takes value 1 if there were no eligible young children for anthropometrics lab var no_teen_eligible "Household has no young children (6-17) eligible for anthropometric" drop teen_eligible hh_n_teen_eligible tab no_teen_eligible, miss *** No eligible children (0-17 years) *** for final child nutrition indicator *********************************************** gen no_eligibles = (no_child_eligible==1 & no_teen_eligible==1) lab var no_eligibles "Household has no children (0-17) eligible for anthropometric" tab no_eligibles, miss sort hh_id ******************************************************************************** *** Step 1.5 RENAMING DEMOGRAPHIC VARIABLES *** ******************************************************************************** //Sample weight clonevar weight = Weight label var weight "Sample weight" //Area: urban or rural codebook strata, tab (9) clonevar area = strata replace area=0 if area==3 replace area=1 if area==2 label define lab_area 1 "urban" 0 "rural" label values area lab_area label var area "Area: urban-rural" tab area, miss //Sex of household member drop sex codebook q01_04 clonevar sex = q01_04 label define lab_sex 1"male" 2"female", replace label values sex lab_sex label var sex "Sex of household member" tab sex //Age of household member drop age desc q01_03 sum q01_03 count if q01_03==. //6 missing clonevar age = q01_03 label var age "Age of household member" //Age group (for global MPI estimation) recode age (0/4 = 1 "0-4")(5/9 = 2 "5-9")(10/14 = 3 "10-14") /// (15/17 = 4 "15-17")(18/59 = 5 "18-59")(60/max=6 "60+"), gen(agec7) lab var agec7 "age groups (7 groups)" recode age (0/9 = 1 "0-9") (10/17 = 2 "10-17")(18/59 = 3 "18-59") /// (60/max=4 "60+") , gen(agec4) lab var agec4 "age groups (4 groups)" recode age (0/17 = 1 "0-17") (18/max = 2 "18+"), gen(agec2) lab var agec2 "age groups (2 groups)" //Total number of de jure hh members in the household drop hhsize gen member = 1 bysort hh_id: egen hhsize = sum(member) label var hhsize "Household size" tab hhsize, miss drop member //Subnational region /* The sample for the Botswana MTHS 2015-16 was designed to provide estimates at the district level*/ clonevar region2 = region drop region //preserve original region variable codebook district_, tab (99) clonevar region = district_ recode region (10=8)(11=9)(12=10)(20=11)(30=12) /// (31=13)(40=14)(50=15)(51=16)(52=17) /// (53=18)(54=19)(60=20)(70=21)(71=22) /// (72=23)(80=24)(90=25)(91=26) lab define lab_dist 1"Gaborone" 2"Francistown" 3"Lobatse" /// 4"Selibe Phikwe" 5"Orapa" 6"Jwaneng" /// 7"Sowa Town" 8"Ngwaketse" 9"Barolong" /// 10"Ngwaketse West" 11"South East" /// 12"Kweneng East" 13"Kweneng West" /// 14"Kgatleng" 15"Central Serowe" /// 16"Central Mahalapye" 17"Central Bobonong" /// 18"Central Boteti" 19"Central Tutume" /// 20"North East" 21"Ngamiland East" /// 22"Ngamiland West" 23"Chobe" /// 24"Ghanzi" 25"Kgalagadi South" /// 26"Kgalagadi North" lab val region lab_dist codebook region, tab (99) lab var region "Region for subnational decomposition" ******************************************************************************** *** Step 2 Data preparation *** *** Standardization of the 10 Global MPI indicators *** Identification of non-deprived & deprived individuals ******************************************************************************** ******************************************************************************** *** Step 2.1 Years of Schooling *** ******************************************************************************** codebook q02_03, tab (99) //Ever attended school: 1=yes; 2=no codebook q02_07, tab (99) //Last grade completed: 0-99; 5,589 missing tab q02_07 if q02_03==2,miss //3,725 did not ever attend school, so did not answer last grade tab age if q02_07==. & q02_03!=2, miss //Children under 5 did not answer last grade. *** Standard MPI *** /*The entire household is considered deprived if no eligible household member has completed SIX years of schooling. */ ******************************************************************* gen eduyears = 0 if q02_03==2 | q02_07==10 | q02_07==88 *replace eduyears = 0 if q02_07==0 | q02_07==3 | q02_07==6 replace eduyears = 1 if q02_07==11 replace eduyears = 2 if q02_07==12 replace eduyears = 3 if q02_07==13 replace eduyears = 4 if q02_07==14 replace eduyears = 5 if q02_07==15 replace eduyears = 6 if q02_07==16 replace eduyears = 7 if q02_07==17 replace eduyears = 8 if q02_07==21 replace eduyears = 9 if q02_07==22 replace eduyears = 10 if q02_07==23 replace eduyears = 11 if q02_07==24 replace eduyears = 12 if q02_07==25 | q02_07==26 replace eduyears = 8 if q02_07==31 replace eduyears = 9 if q02_07==32 replace eduyears = 10 if q02_07==33 replace eduyears = 11 if q02_07==34 replace eduyears = 12 if q02_07==35 replace eduyears = 13 if q02_07==41 replace eduyears = 14 if q02_07==42 replace eduyears = 15 if q02_07==43 replace eduyears = 16 if q02_07==44 replace eduyears = 17 if q02_07==45 replace eduyears = 17 if q02_07==51 replace eduyears = 18 if q02_07==52 replace eduyears = 19 if q02_07==53 replace eduyears = 20 if q02_07==54 replace eduyears = 21 if q02_07==55 replace eduyears = 0 if q02_07>=60 & q02_07<=69 //We replace non-formal school as 0 years education replace eduyears = 7 if eduyears==. & (q02_07==29 | q02_07==39 | /// q02_07==49 | q02_07==59) /*We know that these individuals have attended secondary level and above but can't remember their grades. We assume they have completed at least 7 years of primary.*/ *** Checking for further inconsistencies replace eduyears = . if age<=eduyears & age>0 /*There are cases in which the years of schooling are greater than the age of the individual. This is clearly a mistake in the data.*/ replace eduyears = 0 if age< 10 replace eduyears = 0 if (age==10 | age==11) & eduyears < 6 /*The variable "eduyears" was replaced with a '0' for ineligible household members, i.e.: those who have not completed 6 years of schooling following their starting school age */ lab var eduyears "Total number of years of education accomplished" tab eduyears, miss /*A control variable is created on whether there is information on years of education for at least 2/3 of the eligible household members*/ gen temp = 1 if eduyears!=. & age>=12 & age!=. replace temp = 1 if age==10 & eduyears>=6 & eduyears<. replace temp = 1 if age==11 & eduyears>=6 & eduyears<. bysort hh_id: egen no_missing_edu = sum(temp) //Total eligible household members with no missing years of education gen temp2 = 1 if age>=12 & age!=. replace temp2 = 1 if age==10 & eduyears>=6 & eduyears<. replace temp2 = 1 if age==11 & eduyears>=6 & eduyears<. bysort hh_id: egen hhs = sum(temp2) /*Total number of eligible household members who should have information on years of education */ replace no_missing_edu = no_missing_edu/hhs replace no_missing_edu = (no_missing_edu>=2/3) /*Identify whether there is information on years of education for at least 2/3 of the eligible household members */ tab no_missing_edu, miss //The value for 0 (missing) is 1.28% label var no_missing_edu "No missing edu for at least 2/3 of the eligible HH members" drop temp temp2 hhs *** Standard MPI *** /*The entire household is considered deprived if no household member aged 10 years or older has completed SIX years of schooling. */ ******************************************************************* gen years_edu6 = (eduyears>=6) /* The years of schooling indicator takes a value of "1" if at least someone in the hh has reported 6 years of education or more */ replace years_edu6 = . if eduyears==. bysort hh_id: egen hh_years_edu6_1 = max(years_edu6) gen hh_years_edu6 = (hh_years_edu6_1==1) replace hh_years_edu6 = . if hh_years_edu6_1==. replace hh_years_edu6 = . if hh_years_edu6==0 & no_missing_edu==0 lab var hh_years_edu6 "Household has at least one member with 6 years of edu" tab hh_years_edu6, miss *** Destitution MPI *** /*The entire household is considered deprived if no household member aged 10 years or older has completed at least one year of schooling. */ ******************************************************************* gen years_edu1 = (eduyears>=1) replace years_edu1 = . if eduyears==. bysort hh_id: egen hh_years_edu_u = max(years_edu1) replace hh_years_edu_u = . if hh_years_edu_u==0 & no_missing_edu==0 lab var hh_years_edu_u "Household has at least one member with 1 year of edu" ******************************************************************************** *** Step 2.2 School Attendance *** ******************************************************************************** //q02_03: Ever attended school //q02_14: Currently enrolled in school desc q02_03 q02_14 q02_13 codebook q02_03 q02_14, tab (99) gen attendance = . replace attendance = 1 if q02_14==1 //Replace attendance with '1' if currently attending school replace attendance = 0 if q02_14==2 //Replace attendance with '0' if currently not attending school replace attendance = 0 if q02_03==2 //Replace attendance with '0' if never ever attended school replace attendance = 0 if age<5 | age>24 //Replace attendance with '0' for individuals who are not of school age replace attendance = 0 if q02_14==1 & q02_07>=60 & q02_07<=69 //Replace attendance with '0' if attended school but informal schooling replace attendance = 1 if q02_14==1 & q02_13==1 //Replace attendance with '1' if ever attended school & currently enrolled tab age q02_14, miss label define lab_attend 1 "currently attending" 0 "not currently attending" label values attendance lab_attend label var attendance "Attended school during current school year" tab attendance, miss *** Standard MPI *** /*The entire household is considered deprived if any school-aged child is not attending school up to class 8. */ ******************************************************************* gen child_schoolage = (age>=6 & age<=14) /*In Botswana, the official school entrance age to primary school is 6 years. So, age range is 6-14 (=6+8) Source: "http://data.uis.unesco.org/?ReportId=163" Go to Education>Education>System>Official entrance age to primary education. Look at the starting age and add 8. */ /*A control variable is created on whether there is no information on school attendance for at least 2/3 of the school age children */ count if child_schoolage==1 & attendance==. //How many eligible school aged children are not attending school: 109 children gen temp = 1 if child_schoolage==1 & attendance!=. /*Generate a variable that captures the number of eligible school aged children who are attending school */ bysort hh_id: egen no_missing_atten = sum(temp) /*Total school age children with no missing information on school attendance */ gen temp2 = 1 if child_schoolage==1 bysort hh_id: egen hhs = sum(temp2) //Total number of household members who are of school age replace no_missing_atten = no_missing_atten/hhs replace no_missing_atten = (no_missing_atten>=2/3) /*Identify whether there is missing information on school attendance for more than 2/3 of the school age children */ tab no_missing_atten, miss //The value for 0 (missing) is 1.57% label var no_missing_atten "No missing school attendance for at least 2/3 of the school aged children" drop temp temp2 hhs bysort hh_id: egen hh_children_schoolage = sum(child_schoolage) replace hh_children_schoolage = (hh_children_schoolage>0) //It takes value 1 if the household has children in school age lab var hh_children_schoolage "Household has children in school age" gen child_not_atten = (attendance==0) if child_schoolage==1 replace child_not_atten = . if attendance==. & child_schoolage==1 bysort hh_id: egen any_child_not_atten = max(child_not_atten) gen hh_child_atten = (any_child_not_atten==0) replace hh_child_atten = . if any_child_not_atten==. replace hh_child_atten = 1 if hh_children_schoolage==0 replace hh_child_atten = . if hh_child_atten==1 & no_missing_atten==0 /*If the household has been intially identified as non-deprived, but has missing school attendance for at least 2/3 of the school aged children, then we replace this household with a value of '.' because there is insufficient information to conclusively conclude that the household is not deprived */ lab var hh_child_atten "Household has all school age children up to class 8 in school" tab hh_child_atten, miss /*Note: The indicator takes value 1 if ALL children in school age are attending school and 0 if there is at least one child not attending. Households with no children receive a value of 1 as non-deprived. The indicator has a missing value only when there are all missing values on children attendance in households that have children in school age. */ *** Destitution MPI *** /*The entire household is considered deprived if any school-aged child is not attending school up to class 6. */ ******************************************************************* gen child_schoolage_6 = (age>=6 & age<=12) /*Note: In Botswana, the official school entrance age is 6 years. So, age range for destitution measure is 6-12 (=6+6) */ /*A control variable is created on whether there is no information on school attendance for at least 2/3 of the children attending school up to class 6 */ count if child_schoolage_6==1 & attendance==. gen temp = 1 if child_schoolage_6==1 & attendance!=. bysort hh_id: egen no_missing_atten_u = sum(temp) gen temp2 = 1 if child_schoolage_6==1 bysort hh_id: egen hhs = sum(temp2) replace no_missing_atten_u = no_missing_atten_u/hhs replace no_missing_atten_u = (no_missing_atten_u>=2/3) tab no_missing_atten_u, miss label var no_missing_atten_u "No missing school attendance for at least 2/3 of the school aged children" drop temp temp2 hhs bysort hh_id: egen hh_children_schoolage_6 = sum(child_schoolage_6) replace hh_children_schoolage_6 = (hh_children_schoolage_6>0) lab var hh_children_schoolage_6 "Household has children in school age (6 years of school)" gen child_atten_6 = (attendance==1) if child_schoolage_6==1 replace child_atten_6 = . if attendance==. & child_schoolage_6==1 bysort hh_id: egen any_child_atten_6 = max(child_atten_6) gen hh_child_atten_u = (any_child_atten_6==1) replace hh_child_atten_u = . if any_child_atten_6==. replace hh_child_atten_u = 1 if hh_children_schoolage_6==0 replace hh_child_atten_u = . if hh_child_atten_u==0 & no_missing_atten_u==0 lab var hh_child_atten_u "Household has at least one school age children up to class 6 in school" tab hh_child_atten_u, miss ******************************************************************************** *** Step 2.3 Nutrition *** ******************************************************************************** ******************************************************************************** *** Step 2.3a Child (<60 months) Nutrition *** ******************************************************************************** *** Child Underweight Indicator *** ************************************************************************ *** Standard MPI *** bysort hh_id: egen temp = max(underweight) gen hh_no_underweight = (temp==0) //Takes value 1 if no child in the hh is underweight replace hh_no_underweight = . if temp==. replace hh_no_underweight = 1 if no_child_eligible==1 //Households with no eligible children will receive a value of 1 lab var hh_no_underweight "Household has no child underweight - 2 stdev" drop temp tab hh_no_underweight, miss *** Destitution MPI *** bysort hh_id: egen temp = max(underweight_u) gen hh_no_underweight_u = (temp==0) replace hh_no_underweight_u = . if temp==. replace hh_no_underweight_u = 1 if no_child_eligible==1 lab var hh_no_underweight_u "Destitute: Household has no child underweight" drop temp *** Child Stunting Indicator *** ************************************************************************ *** Standard MPI *** bysort hh_id: egen temp = max(stunting) gen hh_no_stunting = (temp==0) //Takes value 1 if no child in the hh is stunted replace hh_no_stunting = . if temp==. replace hh_no_stunting = 1 if no_child_eligible==1 //Households with no eligible children will receive a value of 1 lab var hh_no_stunting "Household has no child stunted - 2 stdev" drop temp tab hh_no_stunting, miss *** Destitution MPI *** bysort hh_id: egen temp = max(stunting_u) gen hh_no_stunting_u = (temp==0) replace hh_no_stunting_u = . if temp==. replace hh_no_stunting_u = 1 if no_child_eligible==1 lab var hh_no_stunting_u "Destitute: Household has no child stunted" drop temp *** Child Either Underweight or Stunted Indicator *** ************************************************************************ *** Standard MPI *** gen uw_st = 1 if stunting==1 | underweight==1 replace uw_st = 0 if stunting==0 & underweight==0 replace uw_st = . if stunting==. & underweight==. bysort hh_id: egen temp = max(uw_st) gen hh_no_uw_st = (temp==0) //Takes value 1 if no child in the hh is underweight or stunted replace hh_no_uw_st = . if temp==. replace hh_no_uw_st = 1 if no_child_eligible==1 //Households with no eligible children will receive a value of 1 lab var hh_no_uw_st "Household has no child underweight or stunted" drop temp tab hh_no_uw_st, miss *** Destitution MPI *** gen uw_st_u = 1 if stunting_u==1 | underweight_u==1 replace uw_st_u = 0 if stunting_u==0 & underweight_u==0 replace uw_st_u = . if stunting_u==. & underweight_u==. bysort hh_id: egen temp = max(uw_st_u) gen hh_no_uw_st_u = (temp==0) //Takes value 1 if no child in the hh is underweight or stunted replace hh_no_uw_st_u = . if temp==. replace hh_no_uw_st_u = 1 if no_child_eligible==1 //Households with no eligible children will receive a value of 1 lab var hh_no_uw_st_u "Destitute: Household has no child underweight or stunted" drop temp ******************************************************************************** *** Step 2.3a Child (6-17 years) Nutrition *** ******************************************************************************** *** Standard MPI *** bysort hh_id: egen low_bmi = max(low_bmiage) gen hh_no_low_bmiage = (low_bmi==0) /*Households take a value of '1' if all eligible young children (6-17 years) in the household has normal bmi-for-age */ replace hh_no_low_bmiage = . if low_bmi==. /*Households take a value of '.' if there is no information from eligible individuals in the household */ replace hh_no_low_bmiage = 1 if no_teen_eligible==1 //Households take a value of '1' if there is no eligible 6-17 years population. drop low_bmi lab var hh_no_low_bmiage "Household has no 6-17 years with low BMI-for-age" tab hh_no_low_bmiage, miss *** Destitution MPI *** bysort hh_id: egen low_bmi = max(low_bmiage_u) gen hh_no_low_bmiage_u = (low_bmi==0) /*Households take a value of '1' if all eligible young children (6-17 years) in the household has normal bmi-for-age (destitution cutoff) */ replace hh_no_low_bmiage_u = . if low_bmi==. /*Households take a value of '.' if there is no information from eligible individuals in the household */ replace hh_no_low_bmiage_u = 1 if no_teen_eligible==1 //Households take a value of '1' if there is no eligible 6-17 years population. drop low_bmi lab var hh_no_low_bmiage_u "Household has no 6-17 years with low BMI-for-age(<17/-3sd)" tab hh_no_low_bmiage_u, miss ******************************************************************************** *** Step 2.3c Household Nutrition Indicator *** ******************************************************************************** *** Standard MPI *** /* Members of the household are considered deprived if the household has a child <=60 months whose height-for-age or weight-for-age is under two standard deviation below the median, or has young children 6-17 years with BMI-for-age that is under two standard deviation below the median. Households that have no eligible children 6-17 years AND no eligible children <=60 months are considered non-deprived. The indicator takes a value of missing only if all eligible population have missing information in their respective nutrition variable. */ ************************************************************************ gen hh_nutrition_uw_st = 1 replace hh_nutrition_uw_st = 0 if hh_no_low_bmiage==0 | hh_no_uw_st==0 replace hh_nutrition_uw_st = . if hh_no_low_bmiage==. & hh_no_uw_st==. /*Replace indicator as missing if household has eligible population with missing nutrition information */ replace hh_nutrition_uw_st = . if hh_no_low_bmiage==. & hh_no_uw_st==1 & no_child_eligible==1 /*Replace indicator as missing if household has eligible child 6-17 years with missing nutrition information and no eligible child <=60 months for anthropometric measures */ replace hh_nutrition_uw_st = . if hh_no_uw_st==. & hh_no_low_bmiage==1 & no_teen_eligible==1 /*Replace indicator as missing if household has eligible child <=60 months with missing nutrition information and no eligible child 6-17 years for anthropometric measures */ replace hh_nutrition_uw_st = 1 if no_eligibles==1 /*We replace households that do not have the applicable population, that is, children 0-17 years as non-deprived in nutrition*/ lab var hh_nutrition_uw_st "Household has no individuals malnourished" tab hh_nutrition_uw_st, miss *** Destitution MPI *** /* Members of the household are considered deprived if the household has a child <=60 months whose height-for-age or weight-for-age is under three standard deviation below the median, or has young children 6-17 years with BMI-for-age that is under three standard deviation below the median. Households that have no eligible children 6-17 years AND no eligible children <=60 months are considered non-deprived. The indicator takes a value of missing only if all eligible population have missing information in their respective nutrition variable. */ ************************************************************************ gen hh_nutrition_uw_st_u = 1 replace hh_nutrition_uw_st_u = 0 if hh_no_low_bmiage_u==0 | hh_no_uw_st_u==0 replace hh_nutrition_uw_st_u = . if hh_no_low_bmiage_u==. & hh_no_uw_st_u==. /*Replace indicator as missing if household has eligible population with missing nutrition information */ replace hh_nutrition_uw_st_u = . if hh_no_low_bmiage_u==. & hh_no_uw_st_u==1 & no_child_eligible==1 /*Replace indicator as missing if household has eligible child 6-17 years with missing nutrition information and no eligible child <=60 months for anthropometric measures */ replace hh_nutrition_uw_st_u = . if hh_no_uw_st_u==. & hh_no_low_bmiage_u==1 & no_teen_eligible==1 /*Replace indicator as missing if household has eligible child <=60 months with missing nutrition information and no eligible child 6-17 years for anthropometric measures */ replace hh_nutrition_uw_st_u = 1 if no_eligibles==1 /*We replace households that do not have the applicable population, that is, children 0-17 years as non-deprived in nutrition*/ lab var hh_nutrition_uw_st_u "Household has no individuals malnourished (destitution)" tab hh_nutrition_uw_st_u, miss ******************************************************************************** *** Step 2.4 Child Mortality *** ******************************************************************************** /* q03_84: given birth in last 5 years q03_85: did child born in last 5 years die q03_88: is child alive age_most_recentdeath: how old was (NAME) when he/she died? */ gen temp_f = 0 replace temp_f = 1 if q03_85==1 | q03_88==2 //Total child mortality reported by eligible women bysort hh_id: egen child_mortality = sum(temp_f), missing lab var child_mortality "Occurrence of child mortality reported by women" tab child_mortality, miss drop temp_f *** Standard MPI *** /* The standard MPI indicator takes a value of "0" if women in the household reported mortality among children in the last 5 years from the survey year. The indicator takes a value of "1" if eligible women within the household reported (i) no child mortality or (ii) if any child died longer than 5 years from the survey year.*/ ************************************************************************ gen hh_mortality_5y = (child_mortality==0) replace hh_mortality_5y = 0 if child_mortality==1 /* Child mortality information was collected from all women 12-49 who have given birth in the last five years. 7,348 women 12-49. In addition, child mortality information was also collected from household head or spouse who reported recent deaths of household members 12 years and older. The definition of global MPI - death of children under 18 years five years preceeding the survey. As such we take into account of death under 18 reported by household head/spouse, in addition to the information of child mortality in the last five years from women 12-49 years. */ replace hh_mortality_5y = 0 if age_most_recentdeath<18 & hh_mortality_5y ==1 lab var hh_mortality_5y "Household had no child mortality in the last 5 years" tab hh_mortality_5y, miss gen hh_mortality_u18_5y = . lab var hh_mortality_u18_5y "Household had no under 18 child mortality in the last 5 years" *** Destitution MPI *** *** (same as standard MPI) *** ************************************************************************ clonevar hh_mortality_u = hh_mortality_5y ******************************************************************************** *** Step 2.5 Electricity *** ******************************************************************************** desc q09_26 q09_27 q09_28 q09_29 /* q09_29: Connected to BPC grid? q09_26: Main source of lighting q09_27: Fuels for cooking q09_28: Fuel for heating */ *** Standard MPI *** /*Members of the household are considered deprived if the household has no electricity */ **************************************** codebook q09_26 q09_27 q09_28 q09_29, tab (99) //Main source of lighting gen electricity = 1 if q09_26==1 | q09_26==2 | q09_26==3 replace electricity = 0 if q09_26>=4 & q09_26<=98 //Fuels for cooking replace electricity = 1 if (q09_27==1 | q09_27==2) & electricity!=1 //Fuels for heating replace electricity = 1 if (q09_28==1 | q09_28==2) & electricity!=1 //Electric grid replace electricity = 1 if q09_29==1 & electricity!=1 *replace electricity = 1 if q09_29==1 & q09_31<=2 & electricity!=1 label define lab_elec 1 "have electricity" 0 "no electricity" label values electricity lab_elec label var electricity "Household has electricity" tab electricity, miss *** Destitution MPI *** *** (same as standard MPI) *** **************************************** gen electricity_u = electricity label var electricity_u "Household has electricity" ******************************************************************************** *** Step 2.6 Sanitation *** ******************************************************************************** /* Improved sanitation facilities include flush or pour flush toilets to sewer systems, septic tanks or pit latrines, ventilated improved pit latrines, pit latrines with a slab, and composting toilets. These facilities are only considered improved if it is private, that is, it is not shared with other households. Source: https://unstats.un.org/sdgs/metadata/files/Metadata-06-02-01.pdf */ //q09_21: Type of toilet //q09_22: Does share toilet? desc q09_21 q09_22 clonevar toilet = q09_21 clonevar shared_toilet = q09_22 codebook shared_toilet, tab(99) recode shared_toilet (2=0) tab q09_22 shared_toilet, miss nol *** Standard MPI *** /*Members of the household are considered deprived if the household's sanitation facility is not improved (according to the SDG guideline) or it is improved but shared with other households*/ ******************************************************************** codebook toilet, tab(99) gen toilet_mdg = ((toilet<=3 | toilet==5 | toilet==6 | toilet==7 | toilet==9) /// & shared_toilet!=1) /*Household is assigned a value of '1' if it uses improved sanitation and does not share toilet with other households */ replace toilet_mdg = 0 if (toilet<=3 | toilet==5 | toilet==6 | /// toilet==7 | toilet==9) & shared_toilet==1 /*Household is assigned a value of '0' if it uses improved sanitation but shares toilet with other households */ replace toilet_mdg = . if toilet==. //Household is assigned a value of '.' if it has missing information replace toilet_mdg = 0 if shared_toilet==1 /*It may be the case that there are individuals who did not respond on the type of toilet, but they indicated that they share their toilet facilities. In such case, we replace these individuals as deprived following the information on shared toilet.*/ lab var toilet_mdg "Household has improved sanitation" tab toilet toilet_mdg, miss tab toilet_mdg, miss *** Destitution MPI *** /*Members of the household are considered deprived if household practises open defecation or uses other unidentifiable sanitation practises */ ******************************************************************** gen toilet_u = . replace toilet_u = 0 if toilet==12 | toilet==98 /*Household is assigned a value of '0' if it practises open defecation or others */ replace toilet_u = 1 if toilet!=12 & toilet!=98 & toilet!=. /*Household is assigned a value of '1' if it does not practise open defecation or others */ lab var toilet_u "Household does not practise open defecation or others" tab toilet toilet_u, miss ******************************************************************************** *** Step 2.7 Drinking Water *** ******************************************************************************** /* Improved drinking water sources include the following: piped water into dwelling, yard or plot; public taps or standpipes; boreholes or tubewells; protected dug wells; protected springs; packaged water; delivered water and rainwater which is located on premises or is less than a 30-minute walk from home roundtrip. Source: https://unstats.un.org/sdgs/metadata/files/Metadata-06-01-01.pdf q09_16_1: Main source of drinking water q09_17: Time to get to source of water (round trip) MIN */ clonevar water = q09_16_1 clonevar timetowater = q09_17 gen ndwater = . *** Standard MPI *** /* Members of the household are considered deprived if the household does not have access to improved drinking water (according to the SDG guideline) or safe drinking water is at least a 30-minute walk from home, roundtrip */ ******************************************************************** codebook water, tab(99) gen water_mdg = 1 if water==1 | water==2 | water==3 | water==4 | /// water==5 | water==6 | water==8 | water==10 | /// water==11 /*Non deprived if water is piped into dwelling, piped to yard/plot, public tap/standpipe, tube well or borehole, protected well, protected spring, rainwater, bottled water, packaged water */ replace water_mdg = 0 if water==7 | water==9 | water==12 | /// water==13 | water==14 | water==98 /*Deprived if it is unprotected well, unprotected spring, surface water (river/lake, etc),other*/ replace water_mdg = . if water==. lab var water_mdg "Household has safe drinking water on premises" tab water water_mdg, miss tab water_mdg, miss *** Time to water *** ********************************************************* codebook timetowater, tab(999) replace water_mdg = 0 if water_mdg==1 & timetowater >= 30 & timetowater!=. & /// timetowater!=998 & timetowater!=999 //Deprived if water is at more than 30 minutes' walk (roundtrip). tab timetowater if water==.,miss replace water_mdg = 0 if (water==.) & water_mdg==. & /// timetowater >= 30 & timetowater!=. & /// timetowater!=998 & timetowater!=999 /*It may be the case that there are individuals who did not respond on their source of drinking water, but they indicated the water source is 30 minutes or more from home, roundtrip. In such case, we replace these individuals as deprived following the information on distance to water.*/ tab water_mdg, miss *** Destitution MPI *** /* Members of the household is identified as destitute if household does not have access to safe drinking water, or safe water is more than 45 minute walk from home, round trip.*/ ******************************************************************** gen water_u = . replace water_u = 1 if water==1 | water==2 | water==3 | water==4 | /// water==5 | water==6 | water==8 | water==10 | /// water==11 replace water_u = 0 if water==7 | water==9 | water==12 | /// water==13 | water==14 | water==98 replace water_u = 0 if water_u==1 & timetowater> 45 & timetowater!=. /// & timetowater!=998 & timetowater!=999 replace water_u = . if water==. replace water_u = 0 if (water==.) & water_u==. & /// timetowater > 45 & timetowater!=. & /// timetowater!=998 & timetowater!=999 lab var water_u "Household has safe drinking water (considering distance)" tab water_u, miss ******************************************************************************** *** Step 2.8 Housing *** ******************************************************************************** /* Members of the household are considered deprived if the household has a dirt, sand or dung floor */ clonevar floor = q09_05 codebook floor, tab(99) gen floor_imp = 1 replace floor_imp = 0 if floor==3 | floor==4 | floor==7 | floor==8 | floor==98 //Deprived if mud/earth, sand, dung, other replace floor_imp = . if floor==. lab var floor_imp "Household has floor that it is not earth/sand/dung" tab floor floor_imp, miss /* Members of the household are considered deprived if the household has walls made of natural or rudimentary materials. We have identified mud bricks as rudimentary material following the argument that we are not sure whether it is burnt mud brick or not. Furthermore, in neighbouring Zambia, mud brick is considered as rudimentary material following the DHS country survey report (p.409). */ clonevar wall = q09_04 codebook wall, tab(99) gen wall_imp = 1 replace wall_imp = 0 if wall>=2 & wall<=5 | wall==9 | wall==98 /*Deprived if no wall, cane/palms/trunk, mud/dirt, grass/reeds/thatch, pole/bamboo with mud, stone with mud, plywood, cardboard, carton/plastic, uncovered adobe, canvas/tent, unburnt bricks, reused wood, other */ replace wall_imp = . if wall==. lab var wall_imp "Household has wall that it is not of low quality materials" tab wall wall_imp, miss /* Members of the household are considered deprived if the household has roof made of natural or rudimentary materials.*/ clonevar roof = q09_06 codebook roof, tab(99) gen roof_imp = 1 replace roof_imp = 0 if q09_06==2 | q09_06==98 /*Deprived if no roof, thatch/palm leaf, mud/earth/lump of earth, sod/grass, plastic/polythene sheeting, rustic mat, cardboard, canvas/tent, wood planks/reused wood, unburnt bricks, other */ replace roof_imp = . if roof==. lab var roof_imp "Household has roof that it is not of low quality materials" tab roof roof_imp, miss *** Standard MPI *** /* Members of the household is deprived in housing if the roof, floor OR walls are constructed from low quality materials.*/ ************************************************************** gen housing_1 = 1 replace housing_1 = 0 if floor_imp==0 | wall_imp==0 | roof_imp==0 replace housing_1 = . if floor_imp==. & wall_imp==. & roof_imp==. lab var housing_1 "Household has roof, floor & walls that it is not low quality material" tab housing_1, miss *** Destitution MPI *** /* Members of the household is deprived in housing if two out of three components (roof and walls; OR floor and walls; OR roof and floor) the are constructed from low quality materials. */ ************************************************************** gen housing_u = 1 replace housing_u = 0 if (floor_imp==0 & wall_imp==0 & roof_imp==1) | /// (floor_imp==0 & wall_imp==1 & roof_imp==0) | /// (floor_imp==1 & wall_imp==0 & roof_imp==0) | /// (floor_imp==0 & wall_imp==0 & roof_imp==0) replace housing_u = . if floor_imp==. & wall_imp==. & roof_imp==. lab var housing_u "Household has one of three aspects(either roof,floor/walls) that is not low quality material" tab housing_u, miss ******************************************************************************** *** Step 2.9 Cooking Fuel *** ******************************************************************************** /*Solid fuel are solid materials burned as fuels, which includes coal as well as solid biomass fuels (wood, animal dung, crop wastes and charcoal). Source: https://apps.who.int/iris/bitstream/handle/10665/141496/9789241548885_eng.pdf q09_27: Fuels for cooking */ clonevar cookingfuel = q09_27 *** Standard MPI *** /* Members of the household are considered deprived if the household uses solid fuels and solid biomass fuels for cooking. */ ***************************************************************** codebook cookingfuel, tab(99) gen cooking_mdg = 1 if cookingfuel<=4 | cookingfuel==6 | cookingfuel==98 replace cooking_mdg = 0 if cookingfuel==5 | cookingfuel==9 | /// cookingfuel==10 | cookingfuel==11 | /// cookingfuel==12 replace cooking_mdg = . if cookingfuel==. lab var cooking_mdg "Househod has cooking fuel according to MDG standards" tab cookingfuel cooking_mdg, miss tab cooking_mdg, miss *** Destitution MPI *** *** (same as standard MPI) *** **************************************** gen cooking_u = cooking_mdg lab var cooking_u "Household cooks with clean fuels" ******************************************************************************** *** Step 2.10 Assets *** ******************************************************************************** *** Television drop television codebook q09_33_14 gen television = q09_33_14 tab q09_33_14 television *** Radio codebook q09_33_9 q09_33_10 gen radio = q09_33_9 replace radio=1 if radio==2 & q09_33_10==1 tab q09_33_9 q09_33_10 if radio==1,miss tab radio, miss *** Handphone/telephone codebook q09_33_21 q09_33_22 gen telephone = q09_33_21 replace telephone=1 if telephone==2 & q09_33_22==1 tab q09_33_21 q09_33_22 if telephone==1,miss tab telephone,miss *** Refrigerator codebook q09_33_15 gen refrigerator = q09_33_15 tab q09_33_15 refrigerator *** Car/van/lorry/truck codebook q09_33_1 q09_33_2 gen car = q09_33_1 replace car=1 if car==2 & q09_33_2==1 tab q09_33_1 q09_33_2 if car==1,miss tab car,miss *** Bicycle codebook q09_33_5 gen bicycle = q09_33_5 tab q09_33_5 bicycle *** Motorbike/motorized bike codebook q09_33_6 gen motorbike = q09_33_6 tab q09_33_6 motorbike *** Computer/laptop/tablet codebook q09_33_20 gen computer = q09_33_20 tab q09_33_20 computer *** Animal cart codebook q09_33_4 //donkey cart gen animal_cart = q09_33_4 tab q09_33_4 animal_cart //Label indicators lab var television "Household has television" lab var radio "Household has radio" lab var telephone "Household has telephone (landline/mobilephone)" lab var refrigerator "Household has refrigerator" lab var car "Household has car" lab var bicycle "Household has bicycle" lab var motorbike "Household has motorbike" lab var computer "Household has computer" lab var animal_cart "Household has animal cart" foreach var in television radio telephone refrigerator car /// bicycle motorbike computer animal_cart { replace `var' = 0 if `var'==2 label define lab_`var' 0"No" 1"Yes" label values `var' lab_`var' replace `var' = . if `var'==9 | `var'==99 | `var'==8 | `var'==98 } //Categories defined and missing values replaced *** Standard MPI *** /* Members of the household are considered deprived in assets if the household does not own more than one of: radio, TV, telephone, bike, motorbike, refrigerator, computer or animal cart and does not own a car or truck.*/ ***************************************************************************** egen n_small_assets2 = rowtotal(television radio telephone refrigerator bicycle motorbike computer animal_cart), missing lab var n_small_assets2 "Household Number of Small Assets Owned" gen hh_assets2 = (car==1 | n_small_assets2 > 1) replace hh_assets2 = . if car==. & n_small_assets2==. lab var hh_assets2 "Household Asset Ownership: HH has car or more than 1 small assets incl computer & animal cart" tab hh_assets2,miss *** Destitution MPI *** /* Members of the household are considered deprived in assets if the household does not own any assets.*/ ***************************************************************************** gen hh_assets2_u = (car==1 | n_small_assets2>0) replace hh_assets2_u = . if car==. & n_small_assets2==. lab var hh_assets2_u "Household Asset Ownership: HH has car or at least 1 small assets incl computer & animal cart" ******************************************************************************** *** Step 2.11 Rename and keep variables for MPI calculation ******************************************************************************** //Retain data on sampling design: gen psu = cluster rename strata strata_o egen strata = group(district strata_o) codebook strata //replace missing strata replace strata = 1 if region==1 & strata==. replace strata = 2 if region==2 & strata==. replace strata = 8 if region==8 & area==1 & strata==. replace strata = 13 if region==11 & area==1 & strata==. replace strata = 15 if region==12 & area==1 & strata==. replace strata = 21 if region==15 & area==1 & strata==. replace strata = 24 if region==16 & area==0 & strata==. replace strata = 26 if region==17 & area==0 & strata==. replace strata = 28 if region==18 & area==0 & strata==. replace strata = 29 if region==19 & area==1 & strata==. replace strata = 38 if region==23 & area==0 & strata==. replace strata = 39 if region==24 & area==1 & strata==. replace strata = 40 if region==24 & area==0 & strata==. replace strata = 41 if region==25 & area==1 & strata==. replace strata = 42 if region==25 & area==0 & strata==. replace strata = 44 if region==26 & area==0 & strata==. //Retain year, month & date of interview: gen year_interview = . gen month_interview = . gen date_interview = . //Generate missing indicators gen subsample = . *** Rename key global MPI indicators for estimation *** /*In Botswana, child mortality question was on deaths that occured in the last 5 years preceding the survey*/ recode hh_mortality_5y (0=1)(1=0) , gen(d_cm) recode hh_nutrition_uw_st (0=1)(1=0) , gen(d_nutr) recode hh_child_atten (0=1)(1=0) , gen(d_satt) recode hh_years_edu6 (0=1)(1=0) , gen(d_educ) recode electricity (0=1)(1=0) , gen(d_elct) recode water_mdg (0=1)(1=0) , gen(d_wtr) recode toilet_mdg (0=1)(1=0) , gen(d_sani) recode housing_1 (0=1)(1=0) , gen(d_hsg) recode cooking_mdg (0=1)(1=0) , gen(d_ckfl) recode hh_assets2 (0=1)(1=0) , gen(d_asst) *** Rename key global MPI indicators for destitution estimation *** recode hh_mortality_u (0=1)(1=0) , gen(dst_cm) recode hh_nutrition_uw_st_u (0=1)(1=0) , gen(dst_nutr) recode hh_child_atten_u (0=1)(1=0) , gen(dst_satt) recode hh_years_edu_u (0=1)(1=0) , gen(dst_educ) recode electricity_u (0=1)(1=0) , gen(dst_elct) recode water_u (0=1)(1=0) , gen(dst_wtr) recode toilet_u (0=1)(1=0) , gen(dst_sani) recode housing_u (0=1)(1=0) , gen(dst_hsg) recode cooking_u (0=1)(1=0) , gen(dst_ckfl) recode hh_assets2_u (0=1)(1=0) , gen(dst_asst) *** Total number of missing values for each variable *** mdesc psu strata area age /// d_cm d_nutr d_satt d_educ d_elct d_wtr d_sani d_hsg d_ckfl d_asst *** Keep main variables require for MPI calculation *** keep hh_id ind_id psu strata subsample weight area region agec4 agec2 /// d_cm d_nutr d_satt d_educ d_elct d_wtr d_sani d_hsg d_ckfl d_asst order hh_id ind_id psu strata subsample weight area region agec4 agec2 /// d_cm d_nutr d_satt d_educ d_elct d_wtr d_sani d_hsg d_ckfl d_asst *** Generate coutry and survey details for estimation *** char _dta[cty] "Botswana" char _dta[ccty] "BWA" char _dta[year] "2015-2016" char _dta[survey] "BMTHS" char _dta[ccnum] "72" char _dta[type] "micro" char _dta[class] "new_country" *** Sort, compress and save data for estimation *** sort ind_id compress la da "Micro data for `_dta[ccty]' (`_dta[ccnum]') from `c(current_date)' (`c(current_time)')." save "$path_out/bwa_mths15-16.dta", replace erase "$path_out/BWA15-16_CH.dta" erase "$path_out/BWA15-16_TEEN.dta"