The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Postnatal checkup:Rwanda DHS 2014-15
Postnatal checkup:Rwanda DHS 2014-15 [message #12505] Tue, 30 May 2017 22:04 Go to next message
rutonh is currently offline  rutonh
Messages: 1
Registered: March 2013
Location: Rwanda
Member

Hi,

I was trying to replicate Table 9.7: Timing of first postnatal checkup using STATA code developed by Tom Pullum responding to someone's else request but I was not successful. Could someone kindly help me whats wrong with my code?

* sample weight
generate weight = v005/1000000
label var weight "Household sample weight"

gen timingc=6
replace timingc=1 if m51<=103
replace timingc=2 if m51>=104 & m51<=123
replace timingc=3 if m51>=201 & m51<=202
replace timingc=4 if m51>=203 & m51<=206
replace timingc=5 if m51>=207 & m51<=241
replace timingc=. if bidx>1

label define timing 1 "< 4 hours" 2 "4 to 23 hours" 3 "1 to 2 days" 4 "3 to 6 days" 5 "7 to 41 days" 6 "Never"
label values timingc timing
tab timingc [iweight=weight]

Thanks in advance



Re: Postnatal checkup:Rwanda DHS 2014-15 [message #13368 is a reply to message #12505] Sun, 29 October 2017 07:36 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 2313
Registered: February 2013
Senior Member
Follow-up email sent to user.
Re: Postnatal checkup:Rwanda DHS 2014-15 [message #13557 is a reply to message #12505] Fri, 17 November 2017 14:31 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 2313
Registered: February 2013
Senior Member
Dear Hinda

We apologize for the long delay in this response to your query.

Lindsay Mallick, on the DHS staff, has provided Stata code that matches the table. Please see the lines below and the attachment. Please let us know if you have further questions.

With regards

--Tom Pullum


Using the IR file, I matched the report table 9.7 with the following code:

*weight
gen wt = v005/1000000

*create variable for birth in last two years
gen birth2 = 0 if v208>0
replace birth2 =1 if v222<24 
label var birth2 "Had a birth in the last two years"

*generate general variable for if they had a check at all or not
gen check =0 if birth2 ==1 
replace check =1 if (m62_1 ==1 |m66_1==1)  & birth2==1

*recode timing variable
recode m51_1 ( 100/103 =1 "less than 4 hours") (104/123= 2 "4 to 23 hours") (200 = 3 "assume 4-23 hours ") (124/171 201/202 = 4 "1-2 days") (172/197 203/206 =5 "3-6 days new") (207/241 300/305 = 6 "7-41 days new") (242/299 306/899 = 0 "no check/past 41 days") (900/1000 =9 "dk")  (else =99 "missing") if birth2==1 , gen (pnctime) 
*add back in women who said they did not have a check to keep denominator women with birth in 2 yr
replace pnctime = 0 if check==0 & birth2==1

ta pnctime [iw=wt]

Previous Topic: Definition of ARI
Next Topic: Merging children from PR file with Mothers from IR file
Goto Forum:
  


Current Time: Wed Jun 23 13:44:10 Coordinated Universal Time 2021