Data missing after merge - any ideas?
Hello everyone, I have two files - one fairly large (9000 records, 51 fields) and a second one with 500 records, and the same 51 fields. I can read and manipulate both files in Epidata Analysis but when I try to merge them using the common field of ID number, the second one has all missing variables, except the common field of ID number. I can't think what I'm doing wrong. Any guidance would be very helpful! Thanks, Susie Foster
I presume that the smaller file has information that was missing in the first, or updated information on records already in the larger file.
If that is the case, add /update to the merge command to use all non-missing values in the smaller file to replace whatever (missing or not) is in the larger file. Add /updateall to replace everything for records that match.
The help for merge explains the options.
Jamie Hockin Ottawa
On 2010-04-08, Susie wrote:
I have two files - one fairly large (9000 records, 51 fields) and a second one with 500 records, and the same 51 fields. I can read and manipulate both files in Epidata Analysis but when I try to merge them using the common field of ID number, the second one has all missing variables, except the common field of ID number.
Dear Susie:
"Same fields" sounds to me rather like an "append" than a "merge" task, thus I would expect 9500 records, each with a different ID. I wonder why a record should have the same fields (file A) as another record (file B) but have the same ID in file A and file B? It would mean that the same individual can have two different values for the same field and that kind of doesn't tally.
Regards,
Hans
On 20:59, epidata-list@lists.umanitoba.ca wrote:
Hello everyone, I have two files - one fairly large (9000 records, 51 fields) and a second one with 500 records, and the same 51 fields. I can read and manipulate both files in Epidata Analysis but when I try to merge them using the common field of ID number, the second one has all missing variables, except the common field of ID number. I can't think what I'm doing wrong. Any guidance would be very helpful! Thanks, Susie Foster
participants (1)
-
epidata-list@lists.umanitoba.ca