I have a problem merging two panel data sets (one data set with ESG Scores for firms and another data set containing firm fundamentals).
I would like to keep the matched observations as well as the observations for the preceding year because I want to use lagged fundamentals.
Example:
obs. | firm id | year | ESG Score | firm assets |
1 | 1 | 2000 | . | 100 |
2 | 1 | 2001 | . | 101 |
3 | 1 | 2002 | 25 | 102 |
4 | 1 | 2003 | 26 | 103 |
5 | 2 | 2000 | . | 150 |
6 | 3 | 2000 | 50 | 200 |
Considering the above example, I would like to keep observations 2, 3, 4 and 6.
Does anyone have an idea on how to solve my problem?
I would greatly appreciate any help. I use Stata/SE 14.2.
Many thanks in advance and kind regards from Germany

Adriana
0 Response to Merge data sets and keep specific observations
Post a Comment