I have an employer-employee database and need to keep only the individuals that have at least one colleague considering the Firm_id variable by year, but I don't know how to do this in Stata. My dataset is like this:
Code:
Id Firm_id Year 1 50 2010 1 50 2011 2 50 2010 2 50 2011 3 22 2010 3 22 2011 4 22 2010 4 20 2011
The output I'm looking for is like:
Code:
Id Firm_id Year 1 50 2010 1 50 2011 2 50 2010 2 50 2011 3 22 2010 4 22 2010
Regards,
0 Response to Filter specific oservations
Post a Comment