The DHS Program User Forum
Discussions regarding The DHS Program data and results
Today's Messages (on)  | Unanswered Messages (off)

Forum: Domestic Violence
 Topic: MERGING DV CHARACTERISITCS TO CHILD OUTCOME
Re: MERGING DV CHARACTERISITCS TO CHILD OUTCOME [message #28924 is a reply to message #28902] Thu, 28 March 2024 15:20
Janet-DHS is currently offline  Janet-DHS
Messages: 666
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

What do you mean by "a child mortality dummy"? There is a variable b5 in the KR and BR files that is 1 if the child survived to the date of interview and 0 if died.

The IR and BR files go out to a maximum of 20 children ever born. The KR file goes out to a maximum of 5 births because it only includes children born in the past 5 years.

The following Stata lines will add the DV variables for the mother to the children's data.

* Specify a workspace
cd e:\DHS\DHS_data\scratch

* Save a version of the IR file restricted to the DV variables (or other variables
*   you want to add to the KR or BR file), plus the ID variables
 
use "...IAIR7EFL.DTA" , clear
keep v001 v002 v003 v024 d*
save dtemp.dta, replace

* Open the KR or BR file
use "...IAKR7EFL.DTA" , clear
gen in_file=1
tab in_file
merge m:1 v001 v002 v003 v024 using dtemp.dta

* Restrict to cases in the child file
tab _merge in_file,m
keep if in_file==1

* Save this file with a new name



Current Time: Thu Mar 28 19:26:12 Coordinated Universal Time 2024