The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Mortality » Twins and mortality
Re: Twins and mortality [message #14470 is a reply to message #14455] Tue, 10 April 2018 14:30 Go to previous messageGo to previous message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
A response from Dr. Tom Pullum:
Quote:

You need to put both children in the pair onto a single record. I will paste below the lines to do this in Stata. I do not use SPSS. Perhaps you can figure out the Stata lines or find someone to translate them.

I use the BR file rather than the KR file, just because there is no need to restrict to births in the past five years. The procedure involves scratch files (intermediate work files that don't need to be saved). You will have to change the paths.


Quote:

set more off
cd e:\DHS\DHS_data\scratch

use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\IDBR63FL.DTA"

* Construct a data file that has the b variables for both children of a twin birth on one record

* Must allow for the possibility that a mother may have more than one set of twins

numlabel,add
tab b0
keep if b0==1 | b0==2

keep v0* b*
drop b9-b16
rename b* b*_
egen sequence=seq(),by(v001 v002 v003)

reshape wide b*_, i(v001 v002 v003) j(sequence)
tab1 b0*
* 11 women had two pairs of twins; must move them down

save ID63_twins1234.dta, replace
keep v* b*3 b*4
rename b*3 b*1
rename b*4 b*2
save ID63_twins34.dta, replace

use ID63_twins1234.dta, replace
keep v* b*1 b*2
append using ID63_twins34.dta

sort v002 v002 v003 bord_1
save ID63_twins12.dta, replace


Thank you!

[Updated on: Tue, 10 April 2018 14:32]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: undr 5 mortality
Next Topic: Domestic Violence and Infant Mortality- NFHS4
Goto Forum:
  


Current Time: Sat Dec 28 22:35:29 Coordinated Universal Time 2024