The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merge single files into individual, birth, household recode
Re: Merge single files into individual, birth, household recode [message #460 is a reply to message #415] Wed, 22 May 2013 11:28 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3052
Registered: February 2013
Senior Member
Here is a response from one of our DHS experts, Shea Rutstein.

The Peru data from INEI's website for 2009 and later are in SPSS data records by type of record: For women, for the birth history, for the health section, etc. To merge them together into a file like the flat file created from the CSPRO IR file. It is first necessary to change from cases to variables for the multiple section files. For example, there is an SPSS file where each birth is a case (record). This file needs to be converted back to one case per woman with different sets variables for each birth. This conversion can be done using the SPSS syntax CASESTOVARS.

For example using the file rec21.sav, First the file needs to be sorted on caseid and bidx. Then run CASESTOVARS /ID=caseid /separator="$". Finally save with a different file name such as rec21r.sav.
Do this for all the repeating sections and then use MATCH FILES with /BY caseid to add the variables from the transformed repeating sections into the woman's case. Make sure all files are sorted by caseid.
 
Read Message
Read Message
Next Topic: Merging child file with wealth index for Brazil 1996 DHS
Goto Forum:
  


Current Time: Thu May 9 17:25:12 Coordinated Universal Time 2024