/* USE THE CHILDREN'S RECODE: MWKR7HFL Malawi: Standard DHS, 2015-16 */ clear all set matsize 800 set maxvar 10000 set mem 1g cd "..." use "MWKR7HFL", clear set more off ******************************************************************************** ** WEIGHT VARIABLE gen weight = v005/1000000 ******************************************************************************** ** SURVEY SET gen psu = v021 gen strata = v023 svyset psu [pw = weight], strata(strata) vce(linearized) ******************************************************************************** // RENAME rename v013 age_woman rename v106 education rename v190 wealth rename v025 residence rename v024 region //////////////////////////////////////////////////////////////////////////////// // GENERATING DEPENDENT VARIABLES gen child_age=b19 recode child_age (0/1=1 "0-1") (2/3=2 "2-3") (4/5=3 "4-5") (6/8=4 "6-8") /// (9/11=5 "9-11") (12/17=6 "12-17") (18/23=7 "18-23") (else=.), gen(child_age_grp) svy: tab child_age_grp, count format(%4.0f) *keep if child_age_grp !=. * keep only children less than 2 years keep if child_age<24 & b5==1 *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* * IF WAS EVER BOTTLE FED gen bottle=0 replace bottle=1 if m38==1 label define bottle 0"No" 1"Yes" label var bottle "Percentage using a bottle with a nipple?." label val bottle bottle gen bottle2=0 replace bottle2 = 1 if m38==1 & inrange(m4,93,99) replace bottle2 = 0 if (m38==0 & m38==9) & inrange(m4,93,99) label define bottle2 0"No" 1"Yes" label var bottle2 "Percentage using a bottle with a nipple?" label val bottle2 bottle2 ********************************************** *** DELIVERY cap drop place_delivery recode m15 (21/36=1 "Health facility") (11/12=2 "At home") /// (else=3 "Other/Missing"), gen(place_delivery) label var place_delivery "Place of delivery" label val place_delivery place_delivery ** SKILLED BIRTH ATTENDANT cap drop skilled_birth gen skilled_birth = 3 replace skilled_birth = 1 if (m3a==1 | m3b==1) replace skilled_birth = 2 if m3g==1 & (m3b!=1) replace skilled_birth = 4 if m3n==1 label define skilled_birth 1"Health professional" 2"Traditional birth attendant" /// 3"Other" 4"No one" label var skilled_birth "Birth delivered by skilled birth attendant" label val skilled_birth skilled_birth *==============================================================================* ** DROP IF NOT WITHIN SAMPLE qui regr bottle if v208 !=0 [pw=weight] drop if e(sample)!=1 ******************************************************************************** ** CHECK: Table 11.3 Percentage using a bottle with a nipple as on the report svy: tab child_age_grp bottle, count format(%4.0f) svy: tab child_age_grp bottle, percent format(%4.1f) row *==============================================================================* exit