The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » India » Merging BR and PR data (Unmatched Observations)
Re: Merging BR and PR data [message #24786 is a reply to message #24766] Mon, 11 July 2022 10:13 Go to previous messageGo to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 888
Registered: April 2022
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

My apologies for a typo in my previous response. I should not have said v025, which is place of residence (1=urban, 2=rural). State is given by v024. The following merge will work. You need to remove from the BR file the cases with b16=0 or ".", which identify children who have died or left the household. The cases you want are those with _merge=3. You will want to include variables other than those I have included.

use v0* b* using "...IABR7AFL.DTA", clear
drop if b16==0 | b16==.
rename v024 state
rename v001 cluster
rename v002 hh
rename b16 line
sort state cluster hh line
save ...IABRtemp.dta, replace


use hv0* hvidx using "...IAPR7AFL.DTA", clear
rename hv024 state
rename hv001 cluster
rename hv002 hh
rename hvidx line
sort state cluster hh line

merge state cluster hh line using e:\DHS\DHS_data\scratch\IABRtemp.dta
tab _merge
keep if _merge==3
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Treamtment of disputed areas
Next Topic: Where can I find the data for Sibling composition in India
Goto Forum:
  


Current Time: Mon Nov 25 15:56:19 Coordinated Universal Time 2024