******************************************************************************** /* Citation: Oxford Poverty and Human Development Initiative (OPHI), University of Oxford. 2020 Global Multidimensional Poverty Index - Sri Lanka DHS 2016 [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/Sri Lanka DHS 2016" global path_out "cdta" global path_ado "ado" ******************************************************************************** *** SRI LANKA DHS 2016 *** ******************************************************************************** /* Note on microdata: The Sri Lanka Demographic and Health Survey (SLDHS) microdata is not available on the public platform. The microdata was provided by the Department of Census and Statistics through a joint agreement between OPHI and the Department solely for computing and publishing the global MPI aggregates. Country survey report is available online for reference: http://www.statistics.gov.lk/social/SLDHS%202016%20Report%20Final%20Full%2010%20Oct%202017.pdf */ ******************************************************************************** *** Step 1: Data preparation *** Selecting variables from BR, IR, & MR recode & merging with PR recode ******************************************************************************** /*Sri Lanka DHS 2016: All children under 5 and ever married women 15-49 years were selected for anthropometric measurement. */ ******************************************************************************** *** Step 1.1 Children under 5 years ******************************************************************************** /*The purpose of step 1.1 is to compute anthropometric measures for children under 5 years.*/ use "$path_in/survey.dta", clear *** Generate individual unique key variable required for data merging using: *** qaclust=cluster number; *** qanumber=household number; *** qa01=respondent's line number. gen double ind_id = qaclust*1000000 + qanumber*100 + qa01 format ind_id %20.0g label var ind_id "Individual ID" codebook ind_id duplicates report ind_id *** Identify anthropometric sample for children under 5 years codebook qa08, tab (9999) tab qa08 if age_in_dates!=.,miss //10,198 children 0-5 years with information in age in days count if age_in_dates!=. & qh106<. & qh105<. /*Height and weight measure was obtained from 9,445 children under 5 living in households selected for the sample (p.158-159) */ keep if age_in_dates!=. & qh106<. & qh105<. //Only 9,445 children retained. tab qa2c, miss //All children 0-5 years are permenant/usual members of the household gen child_PR=1 //Generate identification variable for observations from this file keep ind_id age_in_dates qa04 qh105 qh106 qh107 child_PR *** Check the variables to calculate the z-scores: *** Variable: SEX *** codebook qa04 //"1" for male ;"2" for female clonevar gender = qa04 tab gender *** Variable: AGE *** tab age_in_dates, miss count if age_in_dates < 0 clonevar age_days = age_in_dates sum age_days *** Variable: AGE UNIT *** gen str6 ageunit = "days" lab var ageunit "Days" *** Variable: BODY WEIGHT (KILOGRAMS) *** codebook qh105, tab (9999) //Measurement is in kilograms clonevar weight = qh105 replace weight = . if qh105>=99 //All missing values or out of range are replaced as "." sum weight *** Variable: HEIGHT (CENTIMETERS) codebook qh106, tab (9999) //Measurement is in centimetres clonevar height = qh106 replace height = . if qh106>=999 //All missing values or out of range are replaced as "." sum height *** Variable: MEASURED STANDING/LYING DOWN *** codebook qh107 gen measure = "l" if qh107==1 //Child measured lying down replace measure = "h" if qh107==2 //Child measured standing up replace measure = " " if qh107==. //Replace with " " if unknown tab measure *** Variable: OEDEMA *** lookfor oedema gen oedema = "n" //It assumes no-one has oedema tab oedema *** 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 sum sw *** Indicate to STATA where the igrowup_restricted.ado file is stored: ***Source of ado file: http://www.who.int/childgrowth/software/en/ adopath + "$path_ado/igrowup_stata" *** We will now proceed to create three nutritional variables: *** weight-for-age (underweight), *** weight-for-height (wasting) *** height-for-age (stunting) *** We specify the first three parameters we need in order to use the ado file: *** reflib, *** datalib, *** datalab /* We use 'reflib' to specify the package directory where the .dta files containing the WHO Child Growth Standards are stored. */ gen str100 reflib = "$path_ado/igrowup_stata" lab var reflib "Directory of reference tables" /* We use datalib to specify the working directory where the input STATA dataset containing the anthropometric measurement is stored. */ gen str100 datalib = "$path_out" lab var datalib "Directory for datafiles" /* We use datalab to specify the name that will prefix the output files that will be produced from using this ado file (datalab_z_r_rc and datalab_prev_rc)*/ gen str30 datalab = "children_nutri_lka" lab var datalab "Working file" /*We now run the command to calculate the z-scores with the adofile */ igrowup_restricted reflib datalib datalab gender age_days 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_lka_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 /* WHO | Freq. Percent Cum. ------------+----------------------------------- 0 | 6,625 70.14 70.14 1 | 1,665 17.63 87.77 . | 1,155 12.23 100.00 ------------+----------------------------------- Total | 9,445 100.00 */ 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 /* | Freq. Percent Cum. ------------+----------------------------------- 0 | 6,769 71.67 71.67 1 | 1,416 14.99 86.66 . | 1,260 13.34 100.00 ------------+----------------------------------- Total | 9,445 100.00 */ 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 /*Sri Lanka DHS 2016: 81 children were replaced as missing because they have extreme z-scores which are biologically implausible. */ count //Sri Lanka DHS 2016: the number of eligible children is 10,198. //Retain relevant variables: keep ind_id child_PR underweight* stunting* wasting* order ind_id child_PR underweight* stunting* wasting* sort ind_id save "$path_out/LKA16_PR_child.dta", replace //Erase files from folder: erase "$path_out/children_nutri_lka_z_rc.xls" erase "$path_out/children_nutri_lka_prev_rc.xls" erase "$path_out/children_nutri_lka_z_rc.dta" ******************************************************************************** *** Step 1.2 BR - BIRTH RECODE *** (All females 15-49 years who ever gave birth) ******************************************************************************** /*The purpose of step 1.2 is to identify children under 18 who died in the last 5 years prior to the survey date.*/ use "$path_in/survey.dta", clear *** Generate individual unique key variable required for data merging using: *** qaclust=cluster number; *** qanumber=household number; *** qa01=respondent's line number. gen double ind_id = qaclust*1000000 + qanumber*100 + qa01 format ind_id %20.0g label var ind_id "Individual ID" keep if qa08>=15 & qa08<=49 & qa04==2 & qa09<4 keep ind_id qaintd qainty qaintm sort ind_id save "$path_out/temp.dta", replace use "$path_in/child_Gmpi_undp.dta", clear count *** Generate individual unique key variable required for data merging using: *** qaclust=cluster number; *** qanumber=household number; *** qa01=respondent's line number. gen double ind_id = qaclust*1000000 + qanumber*100 + qline format ind_id %20.0g label var ind_id "Individual ID" sort ind_id *** Merging file that has interview date information merge m:1 ind_id using "$path_out/temp.dta" keep if _merge==3 drop _merge erase "$path_out/temp.dta" gen v008 = ym(qainty, qaintm) format v008 %tm sum v008 gen b3 = ym(q218y, q218m) format b3 %tm sum b3 desc q218c q223c gen date_death = b3 + q223c //Date of death = date of birth (b3) + age at death (q223c) sum date_death gen mdead_survey = v008 - date_death //Months dead from survey = Date of interview (v008) - date of death replace mdead_survey = 0 if mdead_survey<0 gen ydead_survey = mdead_survey/12 //Years dead from survey sum ydead_survey gen age_death = q223c label var age_death "Age at death in months" sum age_death codebook q219, tab (10) gen child_died = 1 if q219==2 replace child_died = 0 if q219==1 replace child_died = . if q219==. label define lab_died 1 "child has died" 0 "child is alive" label values child_died lab_died tab q219 child_died, miss /*NOTE: For each woman, sum the number of children who died and compare to the number of sons/daughters whom they reported have died */ bysort ind_id: egen tot_child_died = sum(child_died) //Identify child under 18 mortality in the last 5 years gen child18_died = child_died replace child18_died=0 if age_death>=216 & age_death<. label define lab_u18died 1 "child u18 has died" 0 "child is alive/died but older" label values child18_died lab_u18died tab child18_died, miss bysort ind_id: egen tot_child18_died_5y=sum(child18_died) if ydead_survey<=5 /*Total number of children under 18 who died in the past 5 years prior to the interview date */ replace tot_child18_died_5y=0 if tot_child18_died_5y==. & tot_child_died>=0 & tot_child_died<. /*All children who are alive or who died longer than 5 years from the interview date are replaced as '0'*/ replace tot_child18_died_5y=. if child18_died==1 & ydead_survey==. replace tot_child18_died_5y=. if child18_died==1 & ydead_survey<0 //Replace as '.' if there is no information on when the child died tab tot_child_died tot_child18_died_5y, miss bysort ind_id: egen childu18_died_per_wom_5y = max(tot_child18_died_5y) lab var childu18_died_per_wom_5y "Total child under 18 death for each women in the last 5 years (birth recode)" //Keep one observation per women bysort ind_id: gen id=1 if _n==1 keep if id==1 drop id duplicates report ind_id gen women_BR = 1 //Identification variable for observations in this data file //Retain relevant variables keep ind_id women_BR childu18_died_per_wom_5y order ind_id women_BR childu18_died_per_wom_5y sort ind_id save "$path_out/LKA16_BR.dta", replace ******************************************************************************** *** Step 1.3 WOMEN's RECODE *** (Eligible female 15-49 years in the household) ******************************************************************************** /*The purpose of step 1.3 is to identify all deaths that are reported by eligible women.*/ use "$path_in/WOMEN.DTA", clear rename _all, lower *** Generate individual unique key variable required for data merging using: *** qaclust=cluster number; *** qanumber=household number; *** qa01=respondent's line number. gen double ind_id = qaclust*1000000 + qanumber*100 + qline format ind_id %20.0g label var ind_id "Individual ID" codebook ind_id duplicates report ind_id //18,510 women: matches report (p.7) tab q106, miss codebook q201 q206 q207a q207b,tab (999) /* Sri Lanka DHS 2016: Fertility and mortality question was only collected from women 15-49 years.*/ gen women_IR=1 //Identification variable for observations in this data recode //Retain relevant variables: keep ind_id women_IR q201 q206 q207a q207b order ind_id women_IR q201 q206 q207a q207b sort ind_id save "$path_out/LKA16_IR.dta", replace ******************************************************************************** *** Step 1.4 Girls 15-19 years in the household ******************************************************************************** //The purpose of step 1.3 is to compute bmi-for-age for girls 15-19 years. use "$path_in/survey.dta", clear *** Generate individual unique key variable required for data merging using: *** qaclust=cluster number; *** qanumber=household number; *** qa01=respondent's line number. gen double ind_id = qaclust*1000000 + qanumber*100 + qa01 format ind_id %20.0g label var ind_id "Individual ID" codebook ind_id duplicates report ind_id *** Identify anthropometric sample for girls count if qh205!=. count if qh206!=. //18,731 women with weight and height information tab qa09 if qa08>=15 & qa08<=49 & qa04==2 & qh205!=. & qh206!=.,miss //18,731 women 15-49 years who are ever married has been measured tab qawomen, miss tab qawomen if qa08>=15 & qa08<=49 & qa04==2 & qh205!=. & qh206!=.,miss tab qa09 if qa08>=15 & qa08<=19 & qa04==2 & qh205!=. & qh206!=.,miss //238 women 15-19 years who are ever married has been measured *** Keep relevant sample keep if qa08>=15 & qa08<=19 & qa04==2 & qh205!=. & qh206!=. count //Total girls 15-19 years: 238 keep ind_id qa04 qa08 qh205 qh206 qaintm qainty qa07y qa07m ***Variables required to calculate the z-scores to produce BMI-for-age: *** Variable: SEX *** codebook qa04, tab (9) clonevar gender = qa04 //2:female *** Variable: AGE *** gen mdate = ym(qainty, qaintm) gen bdate = ym(qa07y, qa07m) //Calculate birth date in days from date of interview gen age_month = mdate-bdate lab var age_month "Age in months, individuals 15-19 years (girls)" sum age_month *** Variable: AGE UNIT *** gen str6 ageunit = "months" lab var ageunit "Months" *** Variable: BODY WEIGHT (KILOGRAMS) *** codebook qh205, tab (9999) count if qh205>999 tab qh205 if qh205>999, miss gen weight = qh205 if qh205<999 /*Weight information from girls. We divide it by 10 in order to express it in kilograms. Missing values or out of range are identified as "." */ sum weight *** Variable: HEIGHT (CENTIMETERS) codebook qh206, tab (9999) count if qh206>999 tab qh206 if qh206>999, miss gen height = qh206 if qh206<999 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 /* For this part of the do-file we use the WHO AnthroPlus software. This is to calculate the z-scores for young individuals aged 15-19 years. Source of ado file: https://www.who.int/growthref/tools/en/ */ *** Indicate to STATA where the igrowup_restricted.ado file is stored: adopath + "$path_ado/who2007_stata" /* We use 'reflib' to specify the package directory where the .dta files containing the WHO Growth reference are stored. Note that we use strX to specify the length of the path in string. */ gen str100 reflib = "$path_ado/who2007_stata" lab var reflib "Directory of reference tables" /* We use datalib to specify the working directory where the input STATA data set containing the anthropometric measurement is stored. */ gen str100 datalib = "$path_out" lab var datalib "Directory for datafiles" /* We use datalab to specify the name that will prefix the output files that will be produced from using this ado file*/ gen str30 datalab = "girl_nutri_lka" 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 /*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/girl_nutri_lka_z.dta", clear gen z_bmi = _zbfa replace z_bmi = . if _fbfa==1 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 /* Teenage low | bmi 2sd - | WHO | Freq. Percent Cum. ------------+----------------------------------- 0 | 94 39.50 39.50 1 | 6 2.52 42.02 . | 138 57.98 100.00 ------------+----------------------------------- Total | 238 100.00 */ tab low_bmiage_u, miss gen girl_PR=1 //Identification variable for girls 15-19 years in this data //Retain relevant variables: keep ind_id girl_PR age_month low_bmiage* order ind_id girl_PR age_month low_bmiage* sort ind_id save "$path_out/LKA16_PR_girls.dta", replace //Erase files from folder: erase "$path_out/girl_nutri_lka_z.xls" erase "$path_out/girl_nutri_lka_prev.xls" erase "$path_out/girl_nutri_lka_z.dta" ******************************************************************************** *** Step 1.5 DATA MERGING ******************************************************************************** use "$path_in/survey.dta", clear drop hh_id *** Generate a household unique key variable at the household level using: ***qaclust=cluster number ***qanumber=household number gen double hh_id = qaclust*10000 + qanumber format hh_id %20.0g label var hh_id "Household ID" codebook hh_id *** Generate individual unique key variable required for data merging using: *** qaclust=cluster number; *** qanumber=household number; *** qa01=respondent's line number. gen double ind_id = qaclust*1000000 + qanumber*100 + qa01 format ind_id %20.0g label var ind_id "Individual ID" codebook ind_id sort hh_id ind_id *** Merging women - birth history Recode ***************************************** merge 1:1 ind_id using "$path_out/LKA16_BR.dta" drop _merge erase "$path_out/LKA16_BR.dta" *** Merging Women Recode ***************************************** merge 1:1 ind_id using "$path_out/LKA16_IR.dta" drop if _merge==2 drop _merge erase "$path_out/LKA16_IR.dta" *** Merging 15-19 years: girls ***************************************** merge 1:1 ind_id using "$path_out/LKA16_PR_girls.dta" drop _merge erase "$path_out/LKA16_PR_girls.dta" *** Merging child under 5 ***************************************** merge 1:1 ind_id using "$path_out/LKA16_PR_child.dta" drop _merge erase "$path_out/LKA16_PR_child.dta" count //106,354 people ******************************************************************************** *** Step 1.6 KEEP ONLY DE JURE HOUSEHOLD MEMBERS *** ******************************************************************************** /*The Global MPI is based on de jure (permanent) household members only. As such, non-usual residents will be excluded from the sample. */ clonevar resident = qa2c tab resident, miss //all permenant members label var resident "Permanent (de jure) household member" ******************************************************************************** *** Step 1.7 KEEP HOUSEHOLDS SELECTED FOR ANTHROPOMETRIC SUBSAMPLE *** *** if relevant ******************************************************************************** /*No subsample for nutrition. All children under 5 and ever married women 15-49 years were selected for anthropometric measurement */ gen subsample = . label var subsample "Households selected as part of nutrition subsample" ******************************************************************************** *** Step 1.8 CONTROL VARIABLES ******************************************************************************** /* Households are identified as having 'no eligible' members if there are no applicable population, that is, children 0-5 years, adult women 15-49 years or men 15-54 years. These households will not have information on relevant indicators of health. As such, these households are considered as non-deprived in those relevant indicators. */ *** No eligible women 15-49 years *** for adult nutrition indicator *********************************************** count if qa08>=15 & qa08<=49 & qa04==2 & qa09<4 //18,731 women 15-49 years who are ever married has been measured gen fem_nutri_eligible = (qa08>=15 & qa08<=49 & qa04==2 & qa09<4) tab fem_nutri_eligible, miss bysort hh_id: egen hh_n_fem_nutri_eligible = sum(fem_nutri_eligible) gen no_fem_nutri_eligible = (hh_n_fem_nutri_eligible==0) //Takes value 1 if the household had no eligible women for anthropometrics lab var no_fem_nutri_eligible "Household has no eligible women for anthropometric" drop fem_nutri_eligible hh_n_fem_nutri_eligible tab no_fem_nutri_eligible, miss *** No eligible women 15-49 years *** for child mortality indicator ***************************************** gen fem_eligible = (women_IR==1) bysort hh_id: egen hh_n_fem_eligible = sum(fem_eligible) //Number of eligible women for interview in the hh gen no_fem_eligible = (hh_n_fem_eligible==0) //Takes value 1 if the household had no eligible women for an interview lab var no_fem_eligible "Household has no eligible women for interview" drop fem_eligible hh_n_fem_eligible tab no_fem_eligible, miss *** No eligible men 15-54 years *** for adult nutrition indicator (if relevant) *********************************************** //Sri Lanka DHS 2016 has no male anthropometric data. gen no_male_nutri_eligible = . lab var no_male_nutri_eligible "Household has no eligible men for anthropometric" *** No eligible men 15-54 years *** for child mortality indicator (if relevant) ***************************************** //Sri Lanka DHS 2016 has no child mortality information from men gen no_male_eligible = . lab var no_male_eligible "Household has no eligible man for interview" *** No eligible children under 5 *** for child nutrition indicator ***************************************** gen child_eligible = (age_in_dates!=. & qh106<. & qh105<.) 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 women and men *** for adult nutrition indicator *********************************************** /*Sri Lanka DHS 2016 has no male anthropometric data. We replace the eligibility for adults based only on information from women. */ gen no_adults_eligible = (no_fem_nutri_eligible==1) lab var no_adults_eligible "Household has no eligible women or men for anthropometrics" tab no_adults_eligible, miss *** No Eligible Children and Women *** for child and women nutrition indicator *********************************************** gen no_child_fem_eligible = (no_child_eligible==1 & no_fem_nutri_eligible==1) lab var no_child_fem_eligible "Household has no children or women eligible for anthropometric" tab no_child_fem_eligible, miss *** No Eligible Women, Men or Children *** for nutrition indicator *********************************************** /*Sri Lanka DHS 2016 has no male anthropometric data. We replace the eligibility for all based on information from women and children only.*/ gen no_eligibles = (no_fem_nutri_eligible==1 & no_child_eligible==1) lab var no_eligibles "Household has no eligible women, men, or children" tab no_eligibles, miss sort hh_id ind_id ******************************************************************************** *** Step 1.9 RENAMING DEMOGRAPHIC VARIABLES *** ******************************************************************************** drop weight age sex //Sample weight desc qhweight finalweight compare qhweight finalweight /*finalweight = population weight qhweight = household weight (6 decimals)*/ clonevar weight = qhweight label var weight "Sample weight" //Area: urban or rural desc sector codebook sector, tab (5) //1: urban; 2: rural; 3: estate clonevar area = sector replace area=0 if area==3 replace area=0 if area==2 label define lab_area 1 "urban" 0 "rural" label values area lab_area label var area "Area: urban-rural" //Sex of household member codebook qa04 clonevar sex = qa04 label var sex "Sex of household member" //Age of household member codebook qa08, tab (999) clonevar age = qa08 label var age "Age of household member" //Age group 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 gen member = 1 bysort hh_id: egen hhsize = sum(member) label var hhsize "Household size" tab hhsize, miss drop member //Subnational region codebook qaregion, tab (99) decode qaregion, gen(temp) replace temp = proper(temp) encode temp, gen(region) lab var region "Region for subnational decomposition" codebook region, tab (99) drop temp ******************************************************************************** *** Step 2 Data preparation *** *** Standardization of the 10 Global MPI indicators *** Identification of non-deprived & deprived individuals ******************************************************************************** ******************************************************************************** *** Step 2.1 Years of Schooling *** ******************************************************************************** codebook qa14b, tab(30) clonevar eduyears = qa14b //Total number of years of education replace eduyears = 0 if qa14b==88 //Pre school replaced as 0 years of education:1,316 replace eduyears = 0 if qa14a==2 //Those who ever attended school are replaced as 0 years of education: 3,286 replace eduyears = . if qa14b==98 //Recode any unreasonable years of highest education as missing value codebook eduyears, tab(30) replace eduyears = . if eduyears>=age & age>0 /*The variable "eduyears" was replaced with a '.' if total years of education was more than individual's age */ replace eduyears = 0 if age < 10 replace eduyears = 0 if (age==10) & 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 */ /*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>=11 & age!=. replace temp = 1 if age==10 & 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>=11 & age!=. replace temp2 = 1 if age==10 & 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 0.25% label var no_missing_edu "No missing edu for at least 2/3 of the HH members aged 13 years & older" 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" tab hh_years_edu_u, miss ******************************************************************************** *** Step 2.2 Child School Attendance *** ******************************************************************************** codebook qa15 qa17, tab (99) clonevar attendance = qa17 //1=attending, 2=not attending recode attendance (2=0) replace attendance = 0 if qa14a==2 replace attendance = . if qa17==8 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" codebook attendance, tab (99) *** 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>=5 & age<=13) /* Note: In Sri Lanka, the official school entrance age to primary school is 5 years. So, age range is 5-13 (=5+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: 8 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 0.03% 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>=5 & age<=11) /*Note: In Sri Lanka, the official school entrance age is 5 years. So, age range for destitution measure is 5-11 (=5+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 Adult Nutrition *** ******************************************************************************** *** BMI Indicator for Women 15-49 years *** ******************************************************************* gen bmi = qh205/((qh206/100)^2) gen f_bmi = bmi replace f_bmi = . if qh205>900 | qh206>900 lab var f_bmi "Women's BMI" gen f_low_bmi = (f_bmi<18.5) replace f_low_bmi = . if f_bmi==. | f_bmi>=80 //Extreme bmi values are replaced as '.' lab var f_low_bmi "BMI of women < 18.5" tab f_low_bmi, miss gen f_low_bmi_u = (f_bmi<17) replace f_low_bmi_u = . if f_bmi==. | f_bmi>=80 lab var f_low_bmi_u "BMI of women <17" //Note: The BMI threshold applied for destitution is 17 instead of 18.5 *** BMI Indicator for Men 15-59 years *** ******************************************************************* //Note: Sri Lanka DHS 2016 has no anthropometric data for men. gen m_bmi = . lab var m_bmi "Male's BMI" gen m_low_bmi = . lab var m_low_bmi "BMI of male < 18.5" gen m_low_bmi_u = . lab var m_low_bmi_u "BMI of male <17" *** Standard MPI: BMI-for-age for individuals 15-19 years *** and BMI for individuals 20-54 years *** ******************************************************************* gen low_bmi_byage = 0 lab var low_bmi_byage "Individuals with low BMI or BMI-for-age" replace low_bmi_byage = 1 if f_low_bmi==1 //Replace variable "low_bmi_byage = 1" if eligible women have low BMI replace low_bmi_byage = 1 if low_bmi_byage==0 & m_low_bmi==1 /*Replace variable "low_bmi_byage = 1" if eligible men have low BMI. No male anthropometric data: 0 changes are made.*/ /*Note: The following command replaces BMI with BMI-for-age for those between the age group of 15-19 by their age in months where information is available */ //Replacement for girls: replace low_bmi_byage = 1 if low_bmiage==1 & age_month!=. replace low_bmi_byage = 0 if low_bmiage==0 & age_month!=. /*Note: The following control variable is applied when there is BMI information for adults and BMI-for-age for teenagers.*/ replace low_bmi_byage = . if f_low_bmi==. & m_low_bmi==. & low_bmiage==. bysort hh_id: egen low_bmi = max(low_bmi_byage) gen hh_no_low_bmiage = (low_bmi==0) /*Households take a value of '1' if all eligible adults and teenagers in the household has normal bmi or 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_adults_eligible==1 //Households take a value of '1' if there is no eligible adult population. drop low_bmi lab var hh_no_low_bmiage "Household has no adult with low BMI or BMI-for-age" tab hh_no_low_bmiage, miss /*NOTE that hh_no_low_bmiage takes value 1 if: (a) no any eligible individuals in the household has (observed) low BMI or (b) there are no eligible individuals in the household. The variable takes values 0 for those households that have at least one adult with observed low BMI. The variable has a missing value only when there is missing info on BMI for ALL eligible adults in the household */ *** Destitution MPI: BMI-for-age for individuals 15-19 years *** and BMI for individuals 20-54 years *** ******************************************************************************** gen low_bmi_byage_u = 0 replace low_bmi_byage_u = 1 if f_low_bmi_u==1 /*Replace variable "low_bmi_byage_u = 1" if eligible women have low BMI (destitute cutoff)*/ replace low_bmi_byage_u = 1 if low_bmi_byage_u==0 & m_low_bmi_u==1 /*Replace variable "low_bmi_byage_u = 1" if eligible men have low BMI (destitute cutoff). No male anthropometric data - 0 changes are made.*/ /*Note: The following command replaces BMI with BMI-for-age for those between the age group of 15-19 by their age in months where information is available */ //Replacement for girls: replace low_bmi_byage_u = 1 if low_bmiage_u==1 & age_month!=. replace low_bmi_byage_u = 0 if low_bmiage_u==0 & age_month!=. /*Note: The following control variable is applied when there is BMI information for adults and BMI-for-age for teenagers. */ replace low_bmi_byage_u = . if f_low_bmi_u==. & low_bmiage_u==. & m_low_bmi_u==. bysort hh_id: egen low_bmi = max(low_bmi_byage_u) gen hh_no_low_bmiage_u = (low_bmi==0) /*Households take a value of '1' if all eligible adults and teenagers in the household has normal bmi or 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_adults_eligible==1 //Households take a value of '1' if there is no eligible adult population. drop low_bmi lab var hh_no_low_bmiage_u "Household has no adult with low BMI or BMI-for-age(<17/-3sd)" tab hh_no_low_bmiage_u, miss ******************************************************************************** *** Step 2.3b Child 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 hh_no_uw_st = 1 if hh_no_stunting==1 & hh_no_underweight==1 replace hh_no_uw_st = 0 if hh_no_stunting==0 | hh_no_underweight==0 //Takes value 0 if child in the hh is stunted or underweight replace hh_no_uw_st = . if hh_no_stunting==. & hh_no_underweight==. 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" tab hh_no_uw_st, miss *** Destitution MPI *** gen hh_no_uw_st_u = 1 if hh_no_stunting_u==1 & hh_no_underweight_u==1 replace hh_no_uw_st_u = 0 if hh_no_stunting_u==0 | hh_no_underweight_u==0 replace hh_no_uw_st_u = . if hh_no_stunting_u==. & hh_no_underweight_u==. replace hh_no_uw_st_u = 1 if no_child_eligible==1 lab var hh_no_uw_st_u "Destitute: Household has no child underweight or stunted" ******************************************************************************** *** Step 2.3c Household Nutrition Indicator *** ******************************************************************************** *** Standard MPI *** /* Members of the household are considered deprived if the household has a child under 5 whose height-for-age or weight-for-age is under two standard deviation below the median, or has teenager with BMI-for-age that is under two standard deviation below the median, or has adults with BMI threshold that is below 18.5 kg/m2. Households that have no eligible adult AND no eligible children are considered non-deprived. The indicator takes a value of missing only if all eligible adults and eligible children 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 adult and child 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 adult with missing nutrition information and no eligible child for anthropometric measures */ replace hh_nutrition_uw_st = . if hh_no_uw_st==. & hh_no_low_bmiage==1 & no_adults_eligible==1 /*Replace indicator as missing if household has eligible child with missing nutrition information and no eligible adult 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, women 15-49 & children 0-5, 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 under 5 whose height-for-age or weight-for-age is under three standard deviation below the median, or has teenager with BMI-for-age that is under three standard deviation below the median, or has adults with BMI threshold that is below 17.0 kg/m2. Households that have no eligible adult AND no eligible children are considered non-deprived. The indicator takes a value of missing only if all eligible adults and eligible children 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 adult and child 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 adult with missing nutrition information and no eligible child for anthropometric measures */ replace hh_nutrition_uw_st_u = . if hh_no_uw_st_u==. & hh_no_low_bmiage_u==1 & no_adults_eligible==1 /*Replace indicator as missing if household has eligible child with missing nutrition information and no eligible adult 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, women 15-49 & children 0-5, 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 *** ******************************************************************************** codebook q206 q207a q207b //q206: number of daughters and sons who have died egen temp_f = rowtotal(q207a q207b), missing //Total child mortality reported by eligible women replace temp_f = 0 if q201==2 //This line replaces women who have never given birth replace temp_f = 0 if women_IR==1 & q201==1 & q207a==. & q207b==. //This line replaces women who gave birth but had no child mortality bysort hh_id: egen child_mortality_f = sum(temp_f), missing lab var child_mortality_f "Occurrence of child mortality reported by women" tab child_mortality_f, miss drop temp_f gen child_mortality_m = . lab var child_mortality_m "Occurrence of child mortality reported by men" egen child_mortality = rowmax(child_mortality_f child_mortality_m) lab var child_mortality "Total child mortality within household" tab child_mortality, miss *** Standard MPI *** /* Members of the household are considered deprived if women in the household reported mortality among children under 18 in the last 5 years from the survey year. Members of the household is considered non-deprived 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 or (iii) if any child 18 years and older died in the last 5 years. In adddition, members of the household were identified as non-deprived if eligible men within the household reported no child mortality in the absence of information from women. Households that have no eligible women or adult are considered non-deprived. The indicator takes a missing value if there was missing information on reported death from eligible individuals. */ ************************************************************************ tab childu18_died_per_wom_5y, miss /* The 'childu18_died_per_wom_5y' variable was constructed in Step 1.2 using information from individual women who ever gave birth in the BR file. The missing values represent eligible woman who have never ever given birth and so are not present in the BR file. But these 'missing women' may be living in households where there are other women with child mortality information from the BR file. So at this stage, it is important that we aggregate the information that was obtained from the BR file at the household level. This ensures that women who were not present in the BR file is assigned with a value, following the information provided by other women in the household.*/ replace childu18_died_per_wom_5y = 0 if q201==2 replace childu18_died_per_wom_5y = 0 if women_IR==1 & q201==1 & q207a==. & q207b==. /*Assign a value of "0" for: - all women who never ever gave birth - all women who gave birth and have no child mortality */ replace childu18_died_per_wom_5y = 0 if no_fem_eligible==1 /*Assign a value of "0" for: - individuals living in households that have non-eligible women */ bysort hh_id: egen childu18_mortality_5y = sum(childu18_died_per_wom_5y), missing replace childu18_mortality_5y = 0 if childu18_mortality_5y==. & child_mortality==0 /*Replace all households as 0 death if women has missing value and men reported no death in those households */ label var childu18_mortality_5y "Under 18 child mortality within household past 5 years reported by women" tab childu18_mortality_5y, miss gen hh_mortality_u18_5y = (childu18_mortality_5y==0) replace hh_mortality_u18_5y = . if childu18_mortality_5y==. lab var hh_mortality_u18_5y "Household had no under 18 child mortality in the last 5 years" tab hh_mortality_u18_5y, miss *** Destitution MPI *** *** (same as standard MPI) *** ************************************************************************ gen hh_mortality_u = hh_mortality_u18_5y lab var hh_mortality_u "Household had no under 18 child mortality in the last 5 years" ******************************************************************************** *** Step 2.5 Electricity *** ******************************************************************************** lookfor electricity codebook qb22a *** Standard MPI *** /*Members of the household are considered deprived if the household has no electricity */ *************************************************** gen electricity = qb22a replace electricity = 0 if qb22a==2 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 Note: In cases of mismatch between the country report and the internationally agreed guideline, we followed the report. */ desc qb08 qb09 qb10 clonevar toilet = qb08 clonevar shared_toilet = qb09 codebook shared_toilet, tab(99) //1=yes;2=no; .=missing *** 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<23 | toilet==31) & 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<23 | toilet==31) & shared_toilet==1 /*Household is assigned a value of '0' if it uses improved sanitation but shares toilet with other households */ replace toilet_mdg = 0 if toilet == 14 | toilet==15 /*Household is assigned a value of '0' if it uses non-improved sanitation: "flush to somewhere else". According to the report (p.26), the category "flush to don’t know where" (15) is considered improved, while "flush to somewhere else" (14) is non-improved. */ replace toilet_mdg = . if toilet==. | toilet==99 //Household is assigned a value of '.' if it has missing information 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==61 | toilet==96 /*Household is assigned a value of '0' if it practises open defecation or others */ replace toilet_u = 1 if toilet!=61 & toilet!=96 & toilet!=. & toilet!=99 /*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 tab 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 Note: In cases of mismatch between the country report and the internationally agreed guideline, we followed the report. */ desc qb01 qb04 qb07a clonevar water = qb01 clonevar timetowater = qb04 clonevar ndwater = qb07a *** 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==4 | water==5 | /// water==6 | water==7 | water==8 | water==12 /*Non deprived if water is piped into dwelling, piped to yard/plot, public tap/standpipe, tube well or borehole, protected well, protected spring, tanker truck, cart with small cart, bottled water Note: Sri Lanka DHS 2016 identifies rural water supply project as improved source of drinking water */ replace water_mdg = 0 if water==3 | water==9 | /// water==10 | water==11| water==96 /*Deprived if it is unprotected well, unprotected spring, surface water (river/lake, etc), other. Note: Sri Lanka DHS 2016 identifies rain water as unimproved source of drinking water */ replace water_mdg = . if water==99 | water==. lab var water_mdg "Household has drinking water with MDG standards (considering distance)" tab water water_mdg, miss tab water_mdg, miss *** Time to water *** ********************************************************* codebook timetowater, tab(9999) replace water_mdg = 0 if water_mdg==1 & timetowater >= 30 & timetowater!=. & /// timetowater!=996 & timetowater!=998 & timetowater!=999 /*Deprived if water source is 30 minutes or more from home, roundtrip. */ tab timetowater if water==99 | water==.,miss replace water_mdg = 0 if (water==99 | 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 *** Non-drinking activities *** ********************************************************* replace water_mdg = 0 if water==12 & /// (ndwater==3 | ndwater==9 | /// ndwater==10 | ndwater==11 | ndwater==96) /*Households using bottled water for drinking are classified as using unimproved source according to their water source for non-drinking activities */ 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==4 | water==5 | water==6 | /// water==7 | water==8 | water==12 replace water_u = 0 if water==2 | water==3 | water==9 | /// water==10 | water==11 | water==96 replace water_u = 0 if water_u==1 & timetowater>45 & timetowater!=. & /// timetowater!=996 & timetowater!=998 replace water_u = . if water==99 | water==. replace water_u = 0 if water==12 & /// (ndwater==3 | ndwater==9 | /// ndwater==10 | ndwater==11 | ndwater==96) lab var water_u "Household has drinking water with MDG standards (45 minutes distance)" tab water water_u, miss 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 */ lookfor floor clonevar floor = qb19 codebook floor, tab(99) gen floor_imp = 1 replace floor_imp = 0 if floor==3 | floor==5 | floor==96 //Deprived if mud/earth, sand, dung, other replace floor_imp = . if floor==. | floor==99 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 followed the report's definitions of natural or rudimentary materials. */ lookfor wall clonevar wall = qb21 codebook wall, tab(99) gen wall_imp = 1 replace wall_imp = 0 if wall>=5 & wall<=96 /*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==. | wall==99 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. We followed the report's definitions of natural and rudimentary materials. */ lookfor roof clonevar roof = qb20 codebook roof, tab(99) gen roof_imp = 1 replace roof_imp = 0 if roof==6 | roof==96 /*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==. | roof==99 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 */ lookfor cooking fuel clonevar cookingfuel = qb15a *** 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) tab qb12 if cookingfuel==. gen cooking_mdg = 1 replace cooking_mdg = 0 if cookingfuel==4 | cookingfuel==5 replace cooking_mdg = 1 if cookingfuel==. & qb12==2 lab var cooking_mdg "Household uses clean fuels for cooking" /* Deprived if: coal/lignite, charcoal, wood, straw/shrubs/grass, agricultural crop, animal dung */ 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 uses clean fuels for cooking" ******************************************************************************** *** Step 2.10 Assets ownership *** ******************************************************************************** /*Assets that are included in the global MPI: Radio, TV, telephone, bicycle, motorbike, refrigerator, car, computer and animal cart */ *** Television/LCD TV/plasma TV/color TV/black & white tv lookfor tv television plasma lcd codebook qb22e //1=yes; 2=no clonevar television = qb22e lab var television "Household has television" *** Radio/walkman/stereo/kindle lookfor radio walkman stereo codebook qb22d //1=yes; 2=no clonevar radio = qb22d lab var radio "Household has radio" *** Handphone/telephone/iphone/mobilephone/ipod lookfor telephone téléphone mobilephone ipod codebook qb22g qb22f //1=yes; 2=no clonevar telephone = qb22g replace telephone=1 if telephone!=1 & qb22f==1 //qb22f=mobilephone. Combine information on landline and mobilephone. tab qb22g qb22f if telephone==1,miss lab var telephone "Household has telephone (landline/mobilephone)" *** Refrigerator/icebox/fridge lookfor refrigerator réfrigérateur codebook qb22h //1=yes; 2=no clonevar refrigerator = qb22h lab var refrigerator "Household has refrigerator" *** Car/van/lorry/truck lookfor car voiture truck van codebook qb23e qb23f //1=yes; 2=no clonevar car = qb23e replace car=1 if car!=1 & qb23f==1 //qb23f= bus/lorry/truck. Combine information. tab qb23e qb23f if car==1,miss lab var car "Household has car" *** Bicycle/cycle rickshaw lookfor bicycle bicyclette codebook qb23a //1=yes; 2=no clonevar bicycle = qb23a lab var bicycle "Household has bicycle" *** Motorbike/motorized bike/autorickshaw lookfor motorbike moto codebook qb23b //1=yes; 2=no clonevar motorbike = qb23b lab var motorbike "Household has motorbike" *** Computer/laptop/tablet lookfor computer ordinateur laptop ipad tablet codebook qb22i //1=yes; 2=no clonevar computer = qb22i lab var computer "Household has computer" *** Animal cart lookfor cart gen animal_cart = . 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 } //Labels 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" tab hh_assets2_u, miss ******************************************************************************** *** Step 2.11 Rename and keep variables for MPI calculation ******************************************************************************** //Retain data on sampling design: gen psu = qaclust egen strata = group(qadistr sector) //Retain year, month & date of interview: clonevar year_interview = qainty clonevar month_interview = qaintm clonevar date_interview = qaintd *** Rename key global MPI indicators for estimation *** recode hh_mortality_u18_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] "Sri Lanka" char _dta[ccty] "LKA" char _dta[year] "2016" char _dta[survey] "SLDHS" char _dta[ccnum] "144" 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/lka_dhs16.dta", replace