The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » MDD and Sample size mismatch
Re: MDD and Sample size mismatch [message #22953 is a reply to message #22943] Thu, 10 June 2021 13:38 Go to previous messageGo to previous message
Shireen-DHS is currently offline  Shireen-DHS
Messages: 140
Registered: August 2020
Location: USA
Senior Member
Hello Hassen,

I was able to match the final report using the GitHub code. I think perhaps you didn't check the main file first (!NTmain.do). There are certain variables there you need to select the correct children. This was explained in the main do file. Mainly, before running the NT_IYCF.do file you need to run the following code (lines 62 to 101 in the main file) to select the correct children:

**** child's age ****
gen age = v008 - b3

* to check if survey has b19, which should be used instead to compute age.
scalar b19_included=1
capture confirm numeric variable b19, exact
if _rc>0 {
* b19 is not present
scalar b19_included=0
}
if _rc==0 {
* b19 is present; check for values
summarize b19
if r(sd)==0 | r(sd)==. {
scalar b19_included=0
}
}

if b19_included==1 {
drop age
gen age=b19
}

* Note: The following do files select for the youngest child under 2 years living with the mother. Therefore some cases will be dropped.
* Selecting for youngest child under 24 months and living with mother
keep if age < 24 & b9 == 0
* if caseid is the same as the prior case, then not the last born
keep if _n == 1 | caseid != caseid[_n-1]

Following this you can run the following to get the correct estimates for minimum dietary diversity as shown in Table 9.7:
gen wt=v005/1000000

*Among breastfeeding children
tab nt_mdd if nt_bf_curr==1 [iw=wt]
*gives 14.4 and 1246 children as in the report

*Among non-breastfeeding children
tab nt_mdd if nt_bf_curr==0 [iw=wt]
*gives 8% and 217 children as in the report

*Among all children
tab nt_mdd [iw=wt]
*gives 13.5 and 1463 children as in the report


Thank you.
Best,

Shireen Assaf
The DHS Program
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Child Poverty Analysis for Ethiopia
Next Topic: Ethnicities 2019
Goto Forum:
  


Current Time: Wed Nov 27 06:16:04 Coordinated Universal Time 2024