Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Merge m:1 using participant ID in matched case-control data - error messages

    Hi,

    I have a matched case control dataset with 3 controls to every case. I have data that I want to merge into one dataset which is fine the first time I run the merge. But then attempting to merge a third file gives the output either:

    Code:
    variable _merge already defined
    r(110);
    If I input
    Code:
    drop _merge
    I then get this output:

    Code:
    variable id does not uniquely identify observations in the using data
    .

    Can anyone advise?

    Thanks
    Last edited by Joe Tuckles; 18 Nov 2019, 08:35.

  • #2
    your response to the first problem was correct

    the second error message is telling you that your claim that each id only appears once in the "using" data is an incorrect claim - so you need to figure out why and fix it; you might start with
    Code:
    duplicates report id
    to see how big a problem this is

    Comment

    Working...
    X