I am trying to do a 1:1 merge of two datasets based on variable address. There are some duplicates which I remove by:
I then check if address uniquely identifies observations in my dataset:
throws no error. However, when I attempt to do the merge (merge 1:1 address using dataset2.dta), I receive the error "variable address does not uniquely identify observations in the master data."
Can you please suggest what might be the problem? Thank you very much.
Code:
sort address by address: gen dup = cond(_N==1,0,_n) drop if dup != 0
Code:
isid address
Can you please suggest what might be the problem? Thank you very much.
Comment