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
SPSS - Merging Household variables with Individual Women's dataset [message #2404] Fri, 13 June 2014 05:02 Go to previous message
aligazan
Messages: 24
Registered: June 2014
Location: UK
Member
Hello,

I do realise that there have already been lots of posts on this subject. I have read them all, but I am still struggling to understand exactly how to do this on SPSS.

I want to add variables from the HH dataset into the Women's dataset (for Mali 2006). The particular variables I am interested in are to do with the relationships of the household members, and I would ultimately like to know which relatives each woman in the individual dataset, is living with (e.g. no other adult, living with husband, with co-wife, with parent, with parent-in-law, etc.).

This relationship is found from the variables HV101$01 etc. on the HH dataset.

I have seen the code below, but as I am relatively new to SPSS I have been unable to work out how to adapt this for the objective that I am trying to achieve.

I would really appreciate any help with this. THANKS!

Below is an example syntax for merging the HIV Test data with the Women's data in SPSS.

GET FILE='C:\DATAUSER\ZMAR51FL.SAV'.
SORT CASES BY
HIVCLUST (A) HIVNUMB (A) HIVLINE (A).
SAVE OUTFILE='C:\DATAUSER\HIV.sav'
/COMPRESSED.

GET FILE='C:\DATAUSER\ZMIR51FL.SAV'.
SORT CASES BY
V001 (A) V002 (A) V003 (A) .
SAVE OUTFILE='C:\DATAUSER\WOMEN.sav'
/RENAME(V001 V002 V003=
HIVCLUST HIVNUMB HIVLINE)
/COMPRESSED.

GET FILE='C:\DATAUSER\WOMEN.sav'.
MATCH FILES /FILE=*
/TABLE='C:\DATAUSER\HIV.sav'
/BY HIVCLUST HIVNUMB HIVLINE.
EXECUTE.
SAVE OUTFILE='C:\DATAUSER\ZMAR_IR.SAV'
/COMPRESSED.
 
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: Wed Dec 4 13:28:44 Coordinated Universal Time 2024