Dear User,

Thank you for sharing your code. You are on the right track and most of your code is correct. Below I've indicated the changes you need to make to your code to have it match table 11.6.

1. You didn't define mdd4 (or else you didn't include in what you shared). So edit as follows:

*Among breastfed & Non-breastfed *3+ food groups for breastfed children & 4+ groups nonbreastfed egen foodsum = rsum(group1 group2 group3 group4 group5 group6 group7 group8) recode foodsum (1/2 .=0 "No") (3/8=1 "Yes"), gen(mdd3) recode foodsum (1/3 .=0 "No") (4/8=1 "Yes"), gen(mdd4) replace mdd3=. if age<6 replace mdd4=. if age<6 label values mdd3 yesno label var mdd3 "Child with minimum dietary diversity, 3 out of 8 food groups- last-born 6-23 months" label values mdd4 yesno label var mdd4 "Child with minimum dietary diversity, 4 out of 8 food groups- last-born 6-23 months"

//Min meal frequency *Minimum times or more (at least twice a day for breastfed infants 6-8 months and at least three times a day for breastfed children 9-23 months) gen feedings=milkf replace feedings= feedings + m39 if m39>0 & m39<8 gen mmf = (m4==95 & inrange(m39,2,7) & inrange(age,6,8)) | (m4==95 & inrange(m39,3,7) & inrange(age,9,23)) | (m4!=95 & inrange(m39,4,7) & inrange(age,6,23)) replace mmf=. if age<6 label values mmf yesno label var mmf "Child with minimum meal frequency- last-born 6-23 months"

gen milk_milkp= group3 if inrange(age,6,23) & bf_curr==0

gen milkf = 0 replace milkf=milkf + v411 if v411==1 replace milkf=milkf + v411a if v411a==1 replace milkf=milkf + v414p if v414p==1 gen fed_milk= ( milkf>=2 | m4==95|milk_milkp) if inrange(age,6,23) label values fed_milk yesno label var fed_milk "Child given breastmilk or milk products"

As a side note, depending on your analyses, you may want to consider using the most recent definitions of the WHO-UNICEF IYCF indicators https://www.who.int/publications/i/item/9789240018389. The pdf includes some also template code for how to calculate/re-calculate these indicators. You can also review the DHS Program git-hub site which has code for how to re-calculate MDD (5 out of 8 food groups).

Thanks,

Rukundo

]]>

If you can match the table with the GitHub code, except for some small deviations, it's unlikely that we (the analysis team at DHS) could do any better. We often get small deviations for the NFHS-4 and NFHS-5 tables. ]]>

yes I am trying to generate Nigeria 2008 Table 11.6 Infant and young child feeding (IYCF) practices have used the definition as of 2018, for all indicators in 2008 correct estimates are being generated except that minimum meal frequency for non-breastfed and among all children are not generating correct estimates although the same definition and coding is giving correct estimates among breastfed children, as result minimum acceptable diet can't be generated for non-breastfed and among all children, following is the code I used

gen age = v008 - b3

* keep youngest child if under 24 months and living with mother **

keep if age < 24 & b9 == 0

* and keep the last born of those.

* if caseid is the same as the prior case, then not the last born

keep if _n == 1 | caseid != caseid[_n-1]

//currently breastfed

gen bf_curr= m4==95

label values bf_curr yesno

label var bf_curr "Currently breastfeeding"

//Given infant formula

gen inf_formula= v411a==1

label values inf_formula yesno

label var inf_formula "Child given infant formula"

//Given other milk, including fresh, tinned, and powdered animal milk

gen othr_milk= v411==1

label values othr_milk yesno

label var othr_milk "Child given other milk"

//Given other liquids, including juice, juice drinks, clear broth, or other non-milk liquids. Does not include plain water

gen othr_liquids= v413==1

label values othr_liquids yesno

label var othr_liquids "Child given other liquids"

** Solid or Semi-Solid foods**

//Given grains

gen grains= v412a==1| v414e==1 | v412b==1

label values grains yesno

label var grains "Child given grains"

//Given Vit A rich foods

gen vita= v414i==1 | v414j==1 | v414k==1

label values vita yesno

label var vita "Child given vitamin A rich food"

//Given other fruits and vegetables

gen othr_frtveg= v414l==1

label values othr_frtveg yesno

label var othr_frtveg "Child given other fruits or vegetables"

//Given roots and tubers

gen root_tubers= v414f==1

label values root_tubers yesno

label var root_tubers "Child given roots or tubers"

//Given legumes or nuts

gen legumes_nuts= v414o==1

label values legumes_nuts yesno

label var legumes_nuts "Child given legumes or nuts"

//Given meat, fish, shellfish, or poultry

gen meatfish= v414h==1 | v414m==1 | v414n==1

label values meatfish yesno

label var meatfish "Child given meat, fish, shellfish, or poultry"

//Given eggs

gen eggs= v414g==1

label values eggs yesno

label var eggs "Child given eggs"

//Given dairy

gen dairy= v414p==1

label values dairy yesno

label var dairy "Child given cheese, yogurt, or other milk products"

//Given oil,fat & butter

gen fats= v414q==1

label values dairy yesno

label var dairy "Child given cheese, yogurt, or other milk products"

//Given other solid or semi-solid foods

gen solids= grains==1 | vita==1 | othr_frtveg==1 | root_tubers==1 | legumes_nuts==1 | meatfish==1 | eggs==1 | dairy==1 | fats==1 | v414s==1

label values solids yesno

label var solids "Child given any solid or semisolid food"

//Min dietary diversity

1. foods made from grains, roots, tubers, and bananas/plantains, including porridge and fortified baby food from grains

gen group1= grains==1 | root_tubers==1

*2. legumes and nuts

gen group2= legumes_nuts==1

*3. infant formula, milk other than breast milk, cheese or yogurt or other milk products

gen group3= inf_formula==1 | othr_milk==1 | dairy==1

*4. meat, poultry, fish, and shellfish (and organ meats)

gen group4= meatfish==1

*5. eggs

gen group5= eggs==1

*6. vitamin A-rich fruits and vegetables

gen group6= vita==1

*7. other fruits and vegetables

gen group7= othr_frtveg==1

*8 oil,fats and butter

gen group8= fats==1

Among breastfed

3+ food groups for breastfed children

egen foodsum = rsum(group1 group2 group3 group4 group5 group6 group7 group8)

recode foodsum (1/2 .=0 "No") (3/8=1 "Yes"), gen(mdd3)

replace mdd3=. if age<6

label values mdd3 yesno

label var mdd3 "Child with minimum dietary diversity, 3 out of 8 food groups- last-born 6-23 months"

//Min meal frequency

Minimum times or more (at least twice a day for breastfed infants 6-8 months and at least three times a day for breastfed children 9-23 months)

gen feedings=milkf

replace feedings= feedings + m39 if m39>0 & m39<8

gen mmf = (m4==95 & inrange(m39,2,7) & inrange(age,6,8)) | (m4==95 & inrange(m39,3,7) & inrange(age,9,23)) | (m4!=95 & feedings>=4 & inrange(age,6,23))

replace mmf=. if age<6

label values mmf yesno

label var mmf "Child with minimum meal frequency- last-born 6-23 months"

//Min acceptable diet

Both 3+ food groups and minimum times or more

gen mad = (m4==95 & mdd3==1 & mmf==1)

replace mad=. if age<6

label values mad yesno

label var mad "Child with minimum acceptable diet- last-born 6-23 months"

********** Among non breastfeeding********

//Fed milk or milk products

Among non-breastfed children age 6-23 months, percentage fed:

gen milkf = 0

replace milkf=milkf + v411 if v411==1

replace milkf=milkf + v411a if v411a==1

replace milkf=milkf + v414p if v414p==1

gen fed_milk= ( milkf>=2 | m4==95) if inrange(age,6,23)

label values fed_milk yesno

label var fed_milk "Child given milk or milk products"

**** Among all children*******

3+ or 4+ food groups

gen bf_group3=0

replace bf_group3=1 if mdd3==1 & bf_curr==1

gen nonbf_group4=0

replace nonbf_group4=1 if mdd4==1 & bf_curr==0

gen all_group3_4=0

replace all_group3_4=1 if bf_group3==1 | nonbf_group4==1

replace all_group3_4=. if age<6

label variable all_group3_4 "Among all children 6-23 months fed 3+ or 4+ food groups"

]]>

This is a difficult table. If the GitHub program does not match the table, we may not be able to help. Looking at the last row of this table, I see that the n is 62,253, and the last four percentages are 94.2%, 23.0%, 35.1%, and 11.0%. What do you get for that n and those percentages?]]>

Are you trying to match numbers in a specific table in the final report on this survey? If so, which table?]]>

I was wondering if it is somehow possible to calculate the Minimum Dietary Diversity Index for Women (MDD-W), using the data of the individual file of the NFHS-5 in India?

Some information on the consumption of food groups are given, but those are based on a frequency level (daily, weekly, occasionally, never).

In the survey summary of India NFHS-5 (2019-21) at the DHS website, the MDD-W is being named as one of the characteristics of the survey.

So that's why I am asking if there is a method to reformulate the food frequency data into something that can be used for the MDD-W (which is usually based on a 24h recall)??

Thanks in advance for any help!! ]]>