Keep only firms showing up in desired years
* create panel for only existing firms that are in 1992, 2000, and any of the years between 2007-09
keep if inlist(year, 1992, 2000, 2007, 2008, 2009)
bysort sa_finance1_cocode: egen maxyear = max(year)
bysort sa_finance1_cocode: egen minyear = min(year)
drop if inlist(maxyear, 1992, 2000) // drop if never in 2007-2009
drop if inlist(minyear, 2000, 2007, 2008, 2009) // drop if only available in 2000, 2007-2009
// remove firms that do not show up in year 2000
gen yr2000 = (year==2000)
bysort sa_finance1_cocode: egen yr2000sum = sum(yr2000)
drop if yr2000sum == 0
tab year