The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Mortality » Preceding sibling survival status (Difficulty identifying preceding sibling survival status variable)
Re: Preceding sibling survival status [message #20480 is a reply to message #20475] Mon, 09 November 2020 09:41 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

The preceding birth interval is coded on each child's record (as b11) but no b variables for the preceding child are copied. The following code, in Stata rather than R, will do this. It does not carry along any other variables--you need to specify them and be sure to use different names for variables for the index child and variables for older sibling. The mother's variables (including v005) will be the same for both children. You may want to drop, or treat differently, index children with b11=0 or b12=0 (or b0>0), because they will be part of a multiple birth.


cd e:\DHS\DHS_data\scratch
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\NGBR7AFL.DTA", clear 

keep v001 v002 v003 b*

save index_children.dta, replace
save oldersib.dta, replace

use oldersib.dta 
rename b* b*_oldersib
gen bidx=bidx_oldersib-1
drop if bidx==0
sort v001 v002 v003 bidx
save oldersib.dta, replace

use index_children.dta, clear
sort v001 v002 v003 bidx
merge v001 v002 v003 bidx using oldersib.dta
tab _merge
* _merge=1 if there is no older sib, i.e. if bord=1, and the child is the first birth.
* In this case all the b*_oldersib variables will be missing, 

* survival of successive siblings
tab b5 b5_oldersib, m

tab b5 b5_oldersib, chi2
 
Read Message
Read Message
Read Message
Previous Topic: Variables v367 & v401 in Pakistan DHS 2017-18 (BR-File)
Next Topic: Git Hub Coding Versus My Code for Tetanus Vaccine Status
Goto Forum:
  


Current Time: Mon Dec 23 21:57:19 Coordinated Universal Time 2024