I have a dataset with Id-year observations. I want to compare the change before and after/in 2015. Therefore I need all firms to have observations before and after/in 2015 so that I could compare.
ID year diesese
1 2012 3
1 2016 4
3 2013 3
3 2015 4
2 2012 3
2 2013 4
My question is how to delete firm with observations only before 2015, or after 2015? so in data above, only ID=1 and ID=3 match my need, ID=2 does not.