Hello everyone,
I have 2 datasets that needed to be merged. Dataset A has unique IDs with multiple transactions for each ID. Dataset B also has unique IDs with multiple action of rating score at different time. I want to merge A and B using unique IDs. However it goes under a condition that date for each transactions must fall into the date range of rating action. For example, stock C got transactions on 01/01/2019 and 06/01/2019. It also got 2 actions of rating score on 06/01/2018 and 02/28/2019. So when merging stock C on transaction 01/01/2019 would get score that rated on 06/01/2018; transactions on 06/01/2019 would get score that rated on 02/28/2019.
Does anyone know how to approach this problem? Thank you so much!!!
Related Posts with Merge based on time-range condition
Reformatting a monthly date variableI have a date variable in month-year format that looks like "2012m8". I got to that format using the…
Flipping models, coefficients, number of observations and number of clusters with esttabHello everyone, Firstly, I am a Stata 14 user. I have a question regarding esttab command and flipp…
3 Dummy variables in panel dataHello everyone, I have a question since i need 3 dummy variables there must be always one dummy var…
Help with ML ProgramHello, I am trying to define and estimate the parameters from a log likelihood function using minimu…
How to rank value in each specific date of each firmsHi all, I have data as follow (from 04Jan2012 to 31Dec2021) Code: * Example generated by -dataex-. …
Subscribe to:
Post Comments (Atom)
0 Response to Merge based on time-range condition
Post a Comment