The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » Children under 5 in Women's File (Coding for childen under 5)
Re: Children under 5 in Women's File [message #22786 is a reply to message #22780] Mon, 10 May 2021 10:01 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3035
Registered: February 2013
Senior Member

Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

This is a little tricky. There may be another way, but here is one way to do it. "temp.dta" is a sorted version of the KR file that has to be saved somewhere.

use... ZAKR71FL.DTA
keep if b5==1
keep v001 v002 v003
egen living_child_under5=seq(), by(v001 v002 v003)
keep if living_child_under5==1
sort v001 v002 v003
save e:\DHS\DHS_data\scratch\temp.dta, replace

use... ZAIR71FL.DTA
sort v001 v002 v003
merge v001 v002 v003 using e:\DHS\DHS_data\scratch\temp.dta
replace living_child_under5=0 if living_child_under5==.
tab living_child_under5,m
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Please help! DHS Malawi youth-specific
Next Topic: Total Fertility Rates for India
Goto Forum:
  


Current Time: Sat Apr 20 11:51:48 Coordinated Universal Time 2024