The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » Pregnancy outcome for Nepal DHS 2011
Pregnancy outcome for Nepal DHS 2011 [message #14799] Mon, 07 May 2018 01:40
pramesh is currently offline  pramesh
Messages: 41
Registered: November 2015
Location: australia
Member

Dear DHS forum members

I am trying to replicate Nepal DHS report table 9.18. As advised by Trvor, i used the following commands to replicate table 9.18, but for some reason i could not match the numbers as reported in Nepal DHS report of 2011.

use "NPIR60FL.DTA"

* Rename variables to permit reshaping
ren pidx97_0* pidx97_*
ren pord97_0* pord97_*
ren s2*_0* s2*_*

* keep the variables ytou need - you may need more than this list
keep caseid v001 v002 v003 v005 v008 v013 v024 v025 pidx97_* pord97_* s2*_*

* reshape into pregnancies
reshape long pidx97_ pord97_ s215_ s216_ s217_ s219_ s220m_ s220y_ s220c_ ///
s221_ s222_ s223_ s224_ s225u_ s225n_ s226m_ s226y_ s227_ s228_, i(caseid) j(idx)

* drop underscores (_) from names
ren pidx97_ pidx97
ren pord97_ pord97
ren s2*_ s2*

* drop empty pregnancies
drop if pidx97 == .

* outcome of pregnancy
gen outcome = .
replace outcome = 1 if s216==1 | s217 == 1
replace outcome = 2 if outcome == . & s216 == 2
replace outcome = 3 if outcome == . & s228 == 1
replace outcome = 4 if outcome == . & s228 != 1

lab def outcome 1 "Live birth" 2 "Stillbirth" 3 "abortion" 4 "Miscarriage"
lab val outcome outcome

tab outcome,m

tab outcome[iw=v005/1000000]

keep if (v008-s220c)<60

outcome Freq. Percent Cum.

Live birth 4,993.0688 92.61 92.61
Stillbirth 74.296714 1.38 93.99
abortion 83.069322 1.54 95.53
Miscarriage 240.937312 4.47 100.00

Total 5,391.3722 100.00



Can anyone please help in this matter?

Best
Pramesh
 
Read Message
Previous Topic: Merging Nepal 2016 HR + IR data
Next Topic: Postnatal check ups for mother (NDHS 2011 and 2016)
Goto Forum:
  


Current Time: Sat Nov 9 00:04:11 Coordinated Universal Time 2024