-1

In Stata, the error says that variable CLAIM_NUMBER does not uniquely identify observations in the using data. How do I fix that? My code:

cd"abcd"
use NY2019_2021
merge m:1 CLAIM_NUMBER using FULLNY
keep if _merge==3
drop _merge```
common sense
  • 3,775
  • 6
  • 22
  • 31
san
  • 1
  • 2
  • 1
    The answer to this depends on your data. Either you need to `merge` on more variables than one, or there is a problem with duplicates in your data. Without an example of your data, we can't tell. – Nick Cox Jun 28 '21 at 13:21

1 Answers1

0

I was able to drop the ones that weren't unique code:

duplicates list CLAIM_NUMBER
duplicates drop CLAIM_NUMBER, force
Arthur Morris
  • 1,253
  • 1
  • 15
  • 21
san
  • 1
  • 2