The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » KDHS 2022: Table 11.4 Breastfeeding status according to age
KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28231] Mon, 04 December 2023 10:52 Go to next message
sokiya is currently offline  sokiya
Messages: 78
Registered: May 2017
Location: Nairobi
Senior Member
Hi,
I am trying to replicate in the column "Percentage exclusively breastfeeding" in Table 11.4 using the code below taken from DHS GitHub repository

use "KEKR8AFL.dta", clear
**** child's age ****
gen age = v008 - b3

*** Breastfeeding and complementary feeding ***
//currently breastfed
gen nt_bf_curr= m4==95
label values nt_bf_curr yesno
label var nt_bf_curr "Currently breastfeeding - last-born under 2 years"

//breastfeeding status
	gen water=0
	gen liquids=0
	gen milk=0
	gen solids=0

	*Child is given water
	replace water=1 if (v409>=1 & v409<=7)
		   
	*Child given liquids
	foreach xvar of varlist v409a v410 v410a v412c v413*{
	replace liquids=1 if `xvar'>=1 & `xvar'<=7
	}

	*Given powder/tinned milk, formula, or fresh milk
	foreach xvar of varlist v411 v411a {
	replace milk=1 if `xvar'>=1 & `xvar'<=7
	}

	*Given any solid food
	foreach xvar of varlist v414* {
	replace solids=1 if `xvar'>=1 & `xvar'<=7
	}
	replace solids=1 if v412a==1 | v412b==1 | m39a==1
	gen nt_bf_status=1
	replace nt_bf_status=2 if water==1
	replace nt_bf_status=3 if liquids==1
	replace nt_bf_status=4 if milk==1
	replace nt_bf_status=5 if solids==1
	replace nt_bf_status=0 if nt_bf_curr==0
	label define bf_status 0"not bf" 1"exclusively bf" 2"bf & plain water" 3"bf & non-milk liquids" 4"bf & other milk" 5"bf & complemenatry foods"
	label values nt_bf_status bf_status
	label var nt_bf_status "Breastfeeding status for last-born child under 2 years"

//exclusively breastfed
recode nt_bf_status (1=1) (else=0) if age<6, gen(nt_ebf)
label values nt_ebf yesno
label var nt_ebf "Exclusively breastfed - last-born under 6 months"

ta nt_ebf [iw=v005]

with no success. Any help will be greatly appreciated.
Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28244 is a reply to message #28231] Tue, 05 December 2023 08:03 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3196
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

In this survey, age in months is given by b19. In all surveys that include b19, users should use it instead of hw1, which was calculated as v008-b3. I believe the discrepancy may be due to this rather than to the construction of the code for EBF, which has not changed. Also, as in the GitHub code, you need to restrict to children living with the mother (b9=0). Please try again and let us know if you still do not get a match.


Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28247 is a reply to message #28244] Tue, 05 December 2023 11:49 Go to previous messageGo to next message
sokiya is currently offline  sokiya
Messages: 78
Registered: May 2017
Location: Nairobi
Senior Member
Thanks so much for the guidance. I sincerely appreciate.
I have replaced age with b19 as per the code below but I still can't replicate the results
use "${gsdDataRaw}/2022/DHS/KEKR8AFL.dta", clear

*** Breastfeeding and complemenatry feeding ***

//currently breastfed
gen nt_bf_curr= m4==95
label values nt_bf_curr yesno
label var nt_bf_curr "Currently breastfeeding - last-born under 2 years"

//breastfeeding status
	gen water=0
	gen liquids=0
	gen milk=0
	gen solids=0

	*Child is given water
	replace water=1 if (v409>=1 & v409<=7)
		   
	*Child given liquids
	foreach xvar of varlist v409a v410 v410a v412c v413* {
		replace liquids=1 if `xvar'>=1 & `xvar'<=7
	}

	*Given powder/tinned milk, formula, or fresh milk
	foreach xvar of varlist v411 v411a {
		replace milk=1 if `xvar'>=1 & `xvar'<=7
	}

	*Given any solid food
	foreach xvar of varlist v414* {
		replace solids=1 if `xvar'>=1 & `xvar'<=7
	}
	replace solids=1 if v412a==1 | v412b==1 | m39a==1
	gen nt_bf_status=1
	replace nt_bf_status=2 if water==1
	replace nt_bf_status=3 if liquids==1
	replace nt_bf_status=4 if milk==1
	replace nt_bf_status=5 if solids==1
	replace nt_bf_status=0 if nt_bf_curr==0
	label define bf_status 0"not bf" 1"exclusively bf" 2"bf & plain water" 3"bf & non-milk liquids" 4"bf & other milk" 5"bf & complemenatry foods"
	label values nt_bf_status bf_status
	label var nt_bf_status "Breastfeeding status for last-born child under 2 years"

//exclusively breastfed
recode nt_bf_status (1=1) (else=0) if b19<6, gen(nt_ebf)
label values nt_ebf yesno
label var nt_ebf "Exclusively breastfed - last-born under 6 months"

ta nt_ebf [iw=v005] if b9==0
Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28302 is a reply to message #28247] Mon, 11 December 2023 08:54 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3196
Registered: February 2013
Senior Member
Following is a response from Senior DHS staff member, Tom Pullum:

I have prepared a Stata program (attached) that gives the indicator for Table 11.5 of the Kenya 2022 report. There is a discrepancy of 3 cases in the n but the percentages for the overall distribution agree exactly. The category "mixed milk feeding" in Table 11.4 requires a separate construction and I did not take the time to do it. Footnote 1 to table 11.4 would help you to construct it if you want it. Some of the distinctions between categories of "diet" are survey-specific and cannot be done in a generic way. You have to look at the list for variables v409-v414, for example for differences involving yogurt and whether a drink contains sugar. I tried an approach using locals that is different from what's on GitHub.

Here is a link to a related paper that I co-authored recently: https://www.frontiersin.org/articles/10.3389/fnut.2023.10581 34/full.
Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28307 is a reply to message #28302] Mon, 11 December 2023 11:16 Go to previous messageGo to next message
sokiya is currently offline  sokiya
Messages: 78
Registered: May 2017
Location: Nairobi
Senior Member
Thanks so much for taking time and coming up with Stata code for the construction of the variables. I sincerely appreciate.
Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28708 is a reply to message #28302] Wed, 28 February 2024 06:22 Go to previous messageGo to next message
geoK is currently offline  geoK
Messages: 56
Registered: May 2014
Senior Member
Hi, I am trying to replicate this same code for Exclusive Breastfeeding and i found this new code very useful. As I am also looking at change through time by comparing the 2014 Kenya DHS data for exclusive breastfeeding with the latest round for Kenya, should I use this same code for both rounds? Are the two rounds comparable over time? Thank you!

[Updated on: Wed, 28 February 2024 06:24]

Report message to a moderator

Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28718 is a reply to message #28708] Wed, 28 February 2024 14:54 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3196
Registered: February 2013
Senior Member

Following is a response from Senior DHS Stata Specialist, Tom Pullum:

The definition of EBF and the construction of the code have been stable for a long time, but there have been some differences across surveys and changes over time in the specific questions. I believe you are looking at the program I revised to list the variables for types of liquids and foods in groups. You should look at the questionnaire and variable list to review what goes where, with the goal of matching the EBF percentage in the relevant table. Sometimes there are subtle distinctions, for example whether yogurt is a liquid. I hope that a careful reading of the relevant part of the final report will help too.


Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28723 is a reply to message #28718] Thu, 29 February 2024 05:05 Go to previous messageGo to next message
geoK is currently offline  geoK
Messages: 56
Registered: May 2014
Senior Member
Thank you for your reply and clarifications.

I was able to match the respective figures for the two rounds using your revised program and the one on the GitHub for the first round. I guess my question is more about being able to compare the two time points despite small changes e.g. in the food list. In other words, whether despite the small changes in definition and program between the two rounds (e.g. that let's assume yogurt was considered liquid in round 1 but not in round 2), the % change between the two rounds would still be considered valid and meaningful.

I guess so, but I just wanted to make sure. I am looking at MAD right now, and It seems I am encountering a similar situation (but this is for a different post / topic). Thanks again.

Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28731 is a reply to message #28723] Thu, 29 February 2024 16:45 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3196
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

It is a challenge to make comparisons when classifications of any kind have changed between surveys. For diet, it's not just that something like yogurt can move from one category to another. Sometimes a specific type of food is listed in one survey and not in another. You can add a footnote, saying that some small (we hope!) changes are due to changes in the classification.

DHS surveys have been conducted for almost 40 years, and there have been MANY changes in the questions and categories. On top of that, many countries have revised their geographic areas substantially. As I said, a challenge!


Re: KDHS 2022: Table 11.4 Breastfeeding status according to age [message #28733 is a reply to message #28731] Fri, 01 March 2024 03:59 Go to previous message
geoK is currently offline  geoK
Messages: 56
Registered: May 2014
Senior Member

Thanks for the informative answer. It all makes sense to me and I can see the challenge. Best wishes.
Previous Topic: KDHS 2022 - Current use of contraception
Next Topic: KDHS 2022: Table 2.17 Food security status
Goto Forum:
  


Current Time: Mon Nov 18 07:15:42 Coordinated Universal Time 2024