Hi,
I'm dealing with a panel dataset of firms interviewed once a year for the period between 2010 and 2020.
I'd want to investigate the impact of a policy introduced in 2015, so I'd need to eliminate from my dataset all those observations about firms interviewed, let's say, just in 2012, or just in 2018, or in 2013 and 2014, or in 2017 and 2018.
In other words, I want to keep only those firms that have been interviewed at least once before 2015 AND at least once after 2015.
Every observation in my dataset have a variable gpkey (i.e. the firm identification code) and a variable year (i.e. the reference year), together obviously with other variables of interest.
I can't find a way to keep only the observations relative to the firms that satisfy the criterion explained above.
Very grateful to whomever may help me out, I wish you all Merry Christmas
Best,
Mike
I'm dealing with a panel dataset of firms interviewed once a year for the period between 2010 and 2020.
I'd want to investigate the impact of a policy introduced in 2015, so I'd need to eliminate from my dataset all those observations about firms interviewed, let's say, just in 2012, or just in 2018, or in 2013 and 2014, or in 2017 and 2018.
In other words, I want to keep only those firms that have been interviewed at least once before 2015 AND at least once after 2015.
Every observation in my dataset have a variable gpkey (i.e. the firm identification code) and a variable year (i.e. the reference year), together obviously with other variables of interest.
I can't find a way to keep only the observations relative to the firms that satisfy the criterion explained above.
Very grateful to whomever may help me out, I wish you all Merry Christmas
Best,
Mike
Comment