Re: Merge single files into individual, birth, household recode [message #460 is a reply to message #415] |
Wed, 22 May 2013 11:28  |
Bridgette-DHS
Messages: 3230 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.
|
|
|