The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » Replicating table 8.4- Nepal DHS 2011
Re: Replicating table 8.4- Nepal DHS 2011 [message #8648 is a reply to message #8646] Tue, 24 November 2015 19:38 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 697
Registered: January 2013
Senior Member
If you want the twins, you can add the following code to the end:
* sort by case identifiers and century month code of pregnancy end
sort v001 v002 v003 cmc
* save this file
save "pregnancies of 7 months or more.dta"

* Open birth history
use "C:\Data\DHS_Stata\NPBR60FL.DTA", clear
* Sort according to ID and CMC of birth
clonevar cmc = b3
sort v001 v002 v003 cmc
save "births.dta"

* Reopen the pregnancies files and merge in the twins
use "pregnancies of 7 months or more.dta",clear
merge 1:m v001 v002 v003 cmc using "births.dta", keep(master match) keepusing(b*)

tab type [iw=v005/1000000]

This will give you the 5444 cases of pregnancies of 7 months or more, including counting twins separately.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variable Construction
Next Topic: Table 2.11 Clarification
Goto Forum:
  


Current Time: Fri Jun 5 04:59:52 Eastern Daylight Time 2020