I'm merging two datasets (let's call them DatasetA and DatasetB) by two string variables: "journal" and "field". Both DatasetA and DatasetB are "isid journal field".
When I open DatasetA and run:
merge 1:1 journal field using DatasetB
I get the error "variables journal field do not uniquely identify observations in the master data".
BUT I have run "isid journal field" right before the merge, verified that nothing is missing with "assert !missing(journal,field)" and even run "bys journal field: keep if _n==1". For completeness, I have also done this in the using dataset. All the checks pass and nothing gets dropped with the "keep" command, but I still get the error. I get this error in Stata 15 and Stata 16.
Any ideas as to what could be going on are welcome!
Related Posts with Very strange non-unique merge error
Categorizing BMI for children under two years old (zbmicat)Hi all, I am looking at the importance of maternal unemployment for child health in a dataset which…
Excluding*data entriesHi, I have something that is confusing me. I have a dataset and want to merge it with another, but …
age as dummyHello I have a research question involving annual savings by individuals and that I have a panel dat…
r(602) error - package already installed but cannot access ado filesDear all, I have an issue when I try to install the ssc package 'asdoc'. In the past I have always…
collinearityHello I got the below output, I can not understand why stata omitted y1987 and 1988. Thanks Shiva .…
Subscribe to:
Post Comments (Atom)
0 Response to Very strange non-unique merge error
Post a Comment