The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » How to merge a person-level data with a child-level data
How to merge a person-level data with a child-level data [message #20008] Tue, 15 September 2020 02:28 Go to previous message
ojh798 is currently offline  ojh798
Messages: 2
Registered: September 2020
Member
Dear DHS data expert,

I have one question regarding merging dataset A (a person-level data used as a base file) with dataset B (a child-level data used as a secondary file).

Dataset A (a base file or master file): It was reshaped from wide to long based on a list of variables from hvidx_01 to hvidx_21 from a household-level data. In this reshaped data, a new variable called "pnum" (unique person number from 1 to 21 within each household) was created. As linking variables, there are hhid (12-digit number=hv001+hv002) and hv003 (respondent's line number: 3-digit number).

Dataset B (a secondary file or using file): It is a child-level data. As linking variables, there are hwcaseid (15-digit number = hv001+hv002+hv003) and hwline (values = 1, 2, 3).

In order to merge a person-level data (person numbers within each household range from 1 to 21) with a child-level data (child numbers within each household range from 1 to 3), how can I do? The point I would like to consult with you is to ensure which person number in the base data file can correspond to which child number in the secondary data file. Could you help me to resolve with this data merging issue?

Thank you so much in advance.

Best,
Jihyun
 
Read Message
Read Message
Read Message
Previous Topic: Merging IR and PR 2016 UDHS
Next Topic: Merging Couple File with KR File NFHS-4 (India)
Goto Forum:
  


Current Time: Sun Dec 22 10:05:15 Coordinated Universal Time 2024