The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging Household+Female+Male files
Merging Household+Female+Male files [message #3585] Tue, 13 January 2015 16:11 Go to previous message
UAB_user is currently offline  UAB_user
Messages: 21
Registered: September 2014
Location: Alabama
Member
Hello,

Sorry for a double post, but I tried posting this in the "Nepal" section of the forum, but i noticed that several threads have gone unanswered since November and I got nervous my question would be forgotten....

I am looking at male migration in the 2011 Nepal DHS and I want to merge the female file (IR) with the household file (HR) and then merge this to the male file (MR). I know you have to match the male and female files on V001 + V002 + V003 and then match that new data set to the household file using V001 + V002, like what is recommended on the DHS web page, but I am not sure if I did it right since the final number for each merge do not seem to add up.

The Household file has 10826 observations and the female file has 12674 observations. When I merge them with the following SAS code I get 14588 observations.

data derek.full2011;
merge derek.nphr60fl (in=a) derek.npir60fl (in=b) ; by V001 V002 ; run;

The male file has 4121 observations in it and when I merge it into the file above (14588 obs) using the following SAS code I get 18709 observations, which I think means none of the male file merged into my household + female files

data derek.full2011b;
merge derek.full2011 (in=a) derek.npmr60fla (in=b); by V001 V002 V003;
run;


Thank you for the help
Derek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Height and Weight Files
Next Topic: Merge HIV data with individuals
Goto Forum:
  


Current Time: Fri Apr 26 02:04:39 Coordinated Universal Time 2024