The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » Replicating table 9.10 of Nepal DHS 2016
Re: Replicating table 9.10 of Nepal DHS 2016 [message #20042 is a reply to message #20031] Mon, 21 September 2020 14:33
 Shireen-DHS Messages: 140Registered: August 2020 Location: USA Senior Member
Dear Mohan,

The following code below will give you a match with the final report.

Also for the future, please check the DHS code share site on GitHub that contains code for all DHS indicators listed in the Guide to DHS Statistics. https://github.com/DHSProgram/DHS-Indicators-Stata

Thank you.
Best,
Shireen
The DHS Program

Stata code for your C-section in 2016 DHS Nepal survey:

gen age=b19
*define period as birth in the last five years
gen period = 60

*Caesarean delivery
gen rh_del_ces = 0
replace rh_del_ces = 1 if m17==1
replace rh_del_ces = . if age>=period
label define rh_del_ceslab 0 "No" 1 "Yes"
label val rh_del_ces rh_del_ceslab
label var rh_del_ces "Live births delivered by Caesarean"

* mother's age at birth (years): <20, 20-29, 30-39, 40-49
gen months_age=b3-v011
gen mageb=1 if months_age<20*12
replace mageb=2 if months_age>=20*12 & months_age<35*12
replace mageb=3 if months_age>=35*12
label define mageb 1"<20" 2"20-24" 3"35-49"
label values mageb mageb

gen wt=v005/1000000

*this matches Table 9.10 of the Final report
tab mageb rh_del_ces [iw=wt], row

 Replicating table 9.10 of Nepal DHS 2016 By: Mohan on Sat, 19 September 2020 16:12 Re: Replicating table 9.10 of Nepal DHS 2016 By: Shireen-DHS on Mon, 21 September 2020 14:33 Re: Replicating table 9.10 of Nepal DHS 2016 By: Mohan on Tue, 22 September 2020 04:07 Re: Replicating table 9.10 of Nepal DHS 2016 By: rishabh21 on Tue, 22 September 2020 05:55
 Previous Topic: Birth Preparedness Variables Next Topic: Nepal dataset 2011
Goto Forum:

Current Time: Tue Aug 6 04:30:32 Coordinated Universal Time 2024