Hello!
I have some data with firm and year and some other variables, I want to make sure each firm has data in both 2019 and 2020, if there is only 1 year of data and the other year is missing, I need to delete it. How can I do that? Thanks!
For illustration, here are some data
I have some data with firm and year and some other variables, I want to make sure each firm has data in both 2019 and 2020, if there is only 1 year of data and the other year is missing, I need to delete it. How can I do that? Thanks!
For illustration, here are some data
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double firm float year 1 2019 1 2020 2 2019 2 2020 4 2020 5 2019 5 2020 6 2019 6 2020 7 2020 8 2019 8 2020 9 2020 10 2019 11 2019 11 2020 12 2019 12 2020 14 2020 16 2019 17 2019 17 2020 19 2019 19 2020 20 2019 20 2020 format %ty year
Comment