Dear All,
I am attempting to merge the below data sets:
and so on.
and so on.
Both sets carry hundreds of observations.
The only strategy I can think of is to expand the first dataset by two rows per observation, and somehow fill those automatically with "3" and "12". Then I could create a merge ID in both data sets as firm + year + quarter, which would be unique to the second, thus allowing for a m:1 merge.
Do you have any thoughts on which command(s) would do the expansion/population for me, as it would be impossible to populate the quarters manually? Thanks also for commenting on whether sorting will play an important role.
I am attempting to merge the below data sets:
Firm | State | Municipality | Year |
1 | 1 | 1 | 2011 |
1 | 1 | 1 | 2012 |
1 | 1 | 2 | 2011 |
1 | 1 | 2 | 2012 |
2 | 1 | 3 | 2011 |
Firm | Year | Quarter |
1 | 2011 | 3 |
1 | 2011 | 12 |
1 | 2012 | 3 |
1 | 2012 | 12 |
1 | 2013 | 3 |
Both sets carry hundreds of observations.
The only strategy I can think of is to expand the first dataset by two rows per observation, and somehow fill those automatically with "3" and "12". Then I could create a merge ID in both data sets as firm + year + quarter, which would be unique to the second, thus allowing for a m:1 merge.
Do you have any thoughts on which command(s) would do the expansion/population for me, as it would be impossible to populate the quarters manually? Thanks also for commenting on whether sorting will play an important role.
Comment