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

Forum: Merging data files
 Topic: How to merge DLHS 4-Village data and DLHS 4-EW data
How to merge DLHS 4-Village data and DLHS 4-EW data [message #17748] Tue, 21 May 2019 06:25
tanu is currently offline  tanu
Messages: 1
Registered: May 2019
Hi Everyone,

Could anyone please help me to merge the DLHS 4- village data with the DLHS-4-EW data in stata.
The EW data (ever married women data) contains 4 lakh observations (approx) and the village data contains 8555 observations only. I tried to merge using the PSUid but it doesn't work..

Any help would be greatly appreciated.

 Topic: Missing info after merging
Missing info after merging [message #17744] Mon, 20 May 2019 13:25
cippi is currently offline  cippi
Messages: 2
Registered: June 2018
Location: United Kingdom
Dear DHS team,

I am trying to associate variables about mother and father to each child in primary school age who attended (or not attended) school, in this case for the latest Tanzania standard DHS.
I have taken info on school attendance from the PR file, and to find some mother and father variables I have done a merge with the BR file, by doing the following in BR:

rename v001 hv001
rename v002 hv002
rename b16 hvidx
sort hv001 hv002 hvidx

and then do the merge. The primary file i am working on is PR.

After the merge, a very high number of cases where i have valid info for children school attendance variable, do not seem to have information about mother and father (e.g. 1 24 4: 1 24 7 being hv001 hv002 hvidx), so i was wondering if i was doing something wrong, or if these info could be taken from some other files. If so, which files should I use? Can i please also have an example of how the merge should be done if using different files?

thank you!

[Updated on: Tue, 21 May 2019 08:15]

Report message to a moderator

 Topic: Linking child data with parentals information
Linking child data with parentals information [message #17743] Mon, 20 May 2019 05:49
ren_sof is currently offline  ren_sof
Messages: 2
Registered: January 2019

I am working on Colombia DHS 2015 data and need some help regarding the following issue:

I hava data where my unit of analysis are children that contains childĀ“s information such as age, gender, number of sibling, birth order. I want to have parental information(education, occupation of mother and father/partner and household characteristics( place of residence, years living in the same place etc)

What I am doing is:

use "COPR72FL.DTA", clear
sort hv001 hv002 hvidx
save dhsPR.dta, replace

use "COBR72FL.DTA", clear
keep if b16>0 & b16<19
gen line_number_of_mother=v003
ren v001 hv001
ren v002 hv002
ren b16 hvidx
sort hv001 hv002 hvidx
save dhsBR.dta, replace

use dhsPR.dta
merge 1:m hv001 hv002 hvidx using dhsBR.dta

***the lines above I guess link mothers with children in the same household****

However, I also need to link the father/partner information to this dataset.

Could anybody help me pleas? Any ideas? Am I doing something wrong?

I will appreciate your help.


Current Time: Fri May 24 01:56:07 Eastern Daylight Time 2019