The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging individual record to couples record
Merging individual record to couples record [message #13334] Tue, 24 October 2017 01:55 Go to next message
Christopher is currently offline  Christopher
Messages: 4
Registered: February 2017
Location: taipei, Taiwan
Member
Good day,
I am just wondering what is the SAS syntax for merging the couples record (CR) and individual record (IR) files. Am using the couples record of 2016 and also Individual record data-set of 2016. am trying to evaluate the male involvement in the uptake of Ante-Natal Care the primary outcome which is ANC visits is not available in Couples 2016 Malawi data set.

(CR + IR)

Thank you!
  • Attachment: MWCR7HFL.SAS
    (Size: 468.97KB, Downloaded 455 times)
  • Attachment: MWIR7HFL.SAS
    (Size: 800.76KB, Downloaded 473 times)
Re: Merging individual record to couples record [message #13412 is a reply to message #13334] Thu, 02 November 2017 15:31 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member

Following is a response from DHS Senior Sampling Specialist, Mahmoud Elkasabi:

Below is the needed SAS code

data MWIR;
set 'C:\Users\......................\MWIR7HFL.sas7bdat';
RUN;

proc sort data=MWIR;
by V001 V002 V003; run;

data MWCR;
set 'C:\Users\.......................\MWCR7HFL.sas7bdat';
RUN;

proc sort data=MWCR;
by V001 V002 V003; run;

Data MWMI;
merge MWIR MWCR;
by V001 V002 V003;
run;
Previous Topic: urban/rural variable with education data in dhs in stata
Next Topic: merging household data with female data
Goto Forum:
  


Current Time: Mon Dec 23 18:10:29 Coordinated Universal Time 2024