Hi,
I would like to merge two data sets. Dataset A contains the values of the variable x. Among them are duplicates and missing values. Dataset B contains the variables x and y. In the dataset B the variables x are unique, i.e. no duplicates and missing values. The variable y does contain duplicates, i.e. some unique values of x correspond to the same y value. I have tried "merge m:1 using dataset B", but I ve received the errror message that "the variable x does not uniquely identify observations in the using data", which makes sense. Dropping the duplicates from dataset B is not an option. The task I would like to perform would be quite easy in excel with the vlookup function, however this is not possible due to a high number of observations. Do you have any suggestions?
Thank you very much
Best
Denis
Related Posts with Merge with duplicates in the using data set
Removing trailing dashes in the stringHello! I am extracting zip codes from the string variable called adr by using the following command…
Merge a variabel into another datasetHello all, Attached below is a simple example I have made up so I can fully understand this: Lets s…
Generate dummy variables using loopsHi everyone, I am trying to generate a set of dummies for two variables (using the same set of dumm…
Multi level panel data regression comparing alternativesHi everyone, I'm interested in analyzing a state level policy when I have school level data (with s…
How to regress return difference between different periods?Dear stata users, I am now regress anomalies of the long-short strategy during different investor …
Subscribe to:
Post Comments (Atom)
0 Response to Merge with duplicates in the using data set
Post a Comment