Hello,
i have two Datasets that i want to merge. Dataset A contains monthly stock returns for different firms. Among those variables in Dataset A are Stock Return, Date (DDMMYYYY), Year, Company-ID. Dataset B also contains the variables Year and Company-ID. Additionally Dataset B has the Variables Location and Industry which i ultimately want together in a Dataset with the variable Stock Return. E.g: Each observation should have the following information: (Company-ID, Year, Date, Stock Return, Loaction, Industry).
When i want to merge both Datasets using the variables Year and Company-ID i get the message that the observations are not uniquely identifiable. This is for a 1:1, a 1:m and also for a m:1 merge.
I am aware that for every a given Company-ID and Year there are 12 possible matches (one for each month). I am not sure what i am missing as i have seen this kind of "Problem" beeing solved in the same manner before.
I would be glad for any feedback and or alternative approaches. If something is not clear, let me know and i will try to explain it better.
Thank you for your help in advance!
Best Regards
i have two Datasets that i want to merge. Dataset A contains monthly stock returns for different firms. Among those variables in Dataset A are Stock Return, Date (DDMMYYYY), Year, Company-ID. Dataset B also contains the variables Year and Company-ID. Additionally Dataset B has the Variables Location and Industry which i ultimately want together in a Dataset with the variable Stock Return. E.g: Each observation should have the following information: (Company-ID, Year, Date, Stock Return, Loaction, Industry).
When i want to merge both Datasets using the variables Year and Company-ID i get the message that the observations are not uniquely identifiable. This is for a 1:1, a 1:m and also for a m:1 merge.
I am aware that for every a given Company-ID and Year there are 12 possible matches (one for each month). I am not sure what i am missing as i have seen this kind of "Problem" beeing solved in the same manner before.
I would be glad for any feedback and or alternative approaches. If something is not clear, let me know and i will try to explain it better.
Thank you for your help in advance!
Best Regards

Comment