Hi!
I have a panel data with information about different companies and observation over time.
CompanyID Year
1 2000
1 2001
1 2002
1 2003
2 2005
2 2006
2 2008
2 2009
2 2010
2 2011
I want to only keep the companies that has at least three consecutive annual observations. So the result should be like this:
CompanyID Year
1 2000
1 2001
1 2002
1 2003
2 2008
2 2009
2 2010
2 2011
Can someone please help me to write the Do-file codes?
Kind Regards,
Kristian
I have a panel data with information about different companies and observation over time.
CompanyID Year
1 2000
1 2001
1 2002
1 2003
2 2005
2 2006
2 2008
2 2009
2 2010
2 2011
I want to only keep the companies that has at least three consecutive annual observations. So the result should be like this:
CompanyID Year
1 2000
1 2001
1 2002
1 2003
2 2008
2 2009
2 2010
2 2011
Can someone please help me to write the Do-file codes?
Kind Regards,
Kristian
Comment