I've got a panel dataset and I'm exploring the average revenue growth for different sets of firms in my analysis. My problem is that there are occasional gaps in reported revenue, so the value for the next year's revenue growth looks massive but it's artificially high. I'm trying to find a way to drop one year of a particular firm if the previous FiscalYear is not the consecutive FiscalYear.
Ex. If a firm has data reported for 1985, 1986, 1987, 1989, and 1990, I need to drop the 1989 measure (but keep the 1990). A problem that I'm having is that each firm enters in a different year (and obviously the year before the year they enter is missing). Any ideas?
Ex. If a firm has data reported for 1985, 1986, 1987, 1989, and 1990, I need to drop the 1989 measure (but keep the 1990). A problem that I'm having is that each firm enters in a different year (and obviously the year before the year they enter is missing). Any ideas?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int FiscalYear float(ID revenuegrowth) 1985 1 33.389877 1986 1 69.33809 1987 1 120.22394 1988 1 47.0649 1989 1 3.619112 1990 1 -9.775011 1991 1 -1.669667 1992 1 46.70668 1993 1 30.103603 1994 1 52.71821 1995 1 74.70462 1996 1 31.35849 1997 1 68.37021 1998 1 4.85672 1999 1 -26.538774 2000 1 -37.028572 2001 1 -49.05703 2002 1 -37.862717 2003 1 -26.75143 2004 1 -9.233734 2005 1 18.045017 2006 1 54.48685 2007 1 -.6675888 2008 1 -2.0540366 1985 2 62.3022 1985 3 1.178989 1986 3 31.25132 1987 3 36.252876 1988 3 12.185853 1989 3 -4.624655 1990 3 -7.912055 1991 3 -32.264526 1992 3 -1.905245 1993 3 -8.036919 1994 3 -18.681465 1995 3 19.95613 1996 3 43.48161 1997 3 -16.273756 1998 3 -14.587228 1999 3 65.83195 2000 3 -21.711037 2001 3 1.375638 2002 3 15.79177 2003 3 30.70517 2004 3 29.4232 2005 3 46.99264 2006 3 59.54657 2007 3 -66.20706 2008 3 -67.48959 2009 3 -28.365244 2010 3 -18.427797 2011 3 47.30988 2012 3 18.478374 2013 3 33.182064 2014 3 96.1908 2015 3 80.64882 2016 3 48.59673 2017 3 5.94652 1985 4 9.380258 1986 4 18.03886 1987 4 12.47758 1988 4 12.247014 1989 4 4.445596 1990 4 -.50555366 1991 4 -13.06478 1992 4 -12.08143 1993 4 3.428168 1994 4 7.938943 1995 4 8.79007 1996 4 13.35386 1997 4 29.73761 1998 4 15.577185 1999 4 9.167673 2000 4 -17.426857 2001 4 -28.96251 2002 4 -6.547631 2003 4 5.128117 2004 4 11.732513 2005 4 16.050316 2006 4 14.56879 2007 4 26.89458 2008 4 -.9816916 2009 4 -4.704936 2010 4 29.21073 2011 4 13.246998 2012 4 2.3458233 2013 4 -7.451307 2014 4 -22.90662 2015 4 4.160365 2016 4 4.990932 2017 4 -3.15501 2018 4 14.561583 2019 4 .015406257 2020 4 -21.922405 2021 4 5.09646 2022 4 1.430931 1985 5 -2.658226 1987 5 3331.49066 1988 5 -61.96116 end label values ID ID label def ID 1 "3COM CORP", modify label def ID 2 "A & M FOOD SERVICES INC", modify label def ID 3 "A V HOMES INC", modify label def ID 4 "AAR CORP", modify label def ID 5 "ACA JOE INC", modify
Comment