The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » SPSS - Merging Household variables with Individual Women's dataset
Re: SPSS - Merging Household variables with Individual Women's dataset [message #2464 is a reply to message #2458] Mon, 23 June 2014 13:43 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3035
Registered: February 2013
Senior Member
Where are you getting the variables: "s12" and "s36" from (in your syntax)?

The syntax we posted seems perfectly fine, and all you have to do is modify the file names and the path for the file location. See modified syntax below:

get file = 'c:\testing\MLIR52FL.SAV'.
STRING HHID (A12).
COMPUTE HHID = SUBSTR(CASEID,1,12).
VARIABLE LABELS HHID 'Household ID' .
EXECUTE .
MATCH FILES /FILE=*
/TABLE='c:\testing\MLHR52FL.SAV'
/BY hhid.
EXECUTE.
SAVE OUTFILE='c:\testing\HR_IR.SAV'
/COMPRESSED.

[Updated on: Thu, 25 June 2015 13:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merge HIV and Couples
Next Topic: mv001, mv002 and mv034_1 do not uniquely identify observations
Goto Forum:
  


Current Time: Fri Apr 19 01:30:28 Coordinated Universal Time 2024