The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » KDHS 2022: Table 9.7 Place of delivery
KDHS 2022: Table 9.7 Place of delivery [message #28230] Mon, 04 December 2023 10:47 Go to next message
sokiya is currently offline  sokiya
Messages: 78
Registered: May 2017
Location: Nairobi
Senior Member
I am trying to replicate the column "Percentage delivered in a health facility" in Table 9.7 using the code below found from DHS GitHub repo

use "KENR8AFL.dta", clear
//Place of delivery
	recode m15 (20/49 = 1 "Health facility") (10/19 9/99= 0 "Home/other"), gen(rh_del_place)
	label var rh_del_place "Live births by place of delivery"

//Place of delivery - by place type
	recode m15 (20/29 = 1 "Health facility - public") (30/39 = 2 "Health facility - private non-NGO") (41/46=3 "Health facility - private NGO") (10/19 = 4 "Home")(96/98 = 5 "Other") (99=9 "Missing"), gen(rh_del_pltype)
	label var rh_del_pltype "Live births by type of health facility"
ta rh_del_place [iw=v005]

and am finding different results. Any help will be appreciated.
Re: KDHS 2022: Table 9.7 Place of delivery [message #28243 is a reply to message #28230] Tue, 05 December 2023 07:57 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member

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

The following Stata lines will construct all the columns in Table 9.7.

use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\KENR8BFL.DTA" , clear

label list M15

gen place=.
replace place=1 if m15>=20 & m15<30
replace place=2 if m15>=30 & m15<40
replace place=3 if m15>=40 & m15<50
replace place=4 if m15==43 | m15==44
replace place=5 if m15<20
replace place=6 if m15==96

label define place 1 "Public" 2 "Non-NGO" 3 "NGO" 4 "FBO" 5 "Home" 6 "Other"
label values place place

tab m15 place if (p32==1 | p32==2) & p19<=23,m 
* There is one case with a dot; classify it as other
replace place=6 if m15==.

tab place if p32==1 & p19<=23 [iweight=v005/1000000]
tab place if p32==2 & p19<=23 [iweight=v005/1000000]
tab place if (p32==1 | p32==2) & p19<=23 [iweight=v005/1000000]

gen in_facility=0 if place<.
replace in_facility=1 if place<5

tab in_facility if p32==1 & p19<=23 [iweight=v005/1000000]
tab in_facility if p32==2 & p19<=23 [iweight=v005/1000000]
tab in_facility if (p32==1 | p32==2) & p19<=23 [iweight=v005/1000000]

Re: KDHS 2022: Table 9.7 Place of delivery [message #28246 is a reply to message #28243] Tue, 05 December 2023 11:47 Go to previous message
sokiya is currently offline  sokiya
Messages: 78
Registered: May 2017
Location: Nairobi
Senior Member
Thanks so much for the guidance. I sincerely appreciate.
Previous Topic: KDHS 2014 : Percentage of men who have ever experienced physical violence since age 15
Next Topic: KDHS 2022: Table 11.13.3 Nutritional status of men age 2049
Goto Forum:
  


Current Time: Wed Nov 27 04:29:51 Coordinated Universal Time 2024