[EpiData-list] Help - Merging parent and child file into a single file

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Aug 10 13:37:30 CDT 2010

Dear Bola:

This might indeed a bit tricky as EpiData does not have a "reshape" 
command.  However, once you master the principle, it is straight forward.

1) The merging process is done in EpiData Analysis
2) You read the CHILD.REC and MERGE the PARENT.REC to it:
     read child.rec /merge=parent.rec
     savedata child_parent.rec /replace
3) Now you have as many records as there are in the child.rec or one 
could say you have "examinations" rather than "examinees".  This is 
sufficient for many purposes, for instance if you have a continuous 
variable like plasma glucose and you are interested in means, over all 
observations, by patient, by sex, or any other characteristics, and 
EpiData Analysis does this quite superbly.
4)  If you need to end up with "examinees" and for each of them you need 
the result of each examination, it gets a bit more complex.  You need 
first to know what the maximum number of examinations (child records) 
for each examinee is and then you need to create as many variables as 
this number for each variable, eg, if you have a field pg (plasma 
glucose) in the child record and you have up to five child records per 
examinee, you need 5 vairable, ie, bs1, bs2,...,bs5 and then "reshuffle" 
the information from the "long-to-wide".  You can find a detailed 
account and step by step instructions with an example on how this is 
done at the web site www.tbrieder.org: go to EpiData, Part D, Exercise 1.

I hope this helps getting you on track.


On 20:59, epidata-list at lists.umanitoba.ca wrote:
> Hi all,
> Please how can I make parent and child datafile merge into one single file when converting the data to SPSS.
> Thank you.
> Bola
> Nigeria

Hans L Rieder, MD, MPH
Jetzikofenstr 12
3038 Kirchlindach

Tel: +41 31 829 4577
Mob: +41 79 321 9122
Web: http://www.tbrieder.org

More information about the EpiData-list mailing list