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 Go to previous messageGo to previous message
Shireen-DHS is currently offline  Shireen-DHS
Messages: 140
Registered: 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
Please read the readme files and main files before attempting to run the do files.

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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Birth Preparedness Variables
Next Topic: Nepal dataset 2011
Goto Forum:
  


Current Time: Fri Apr 26 00:25:52 Coordinated Universal Time 2024