I am examining a difference in difference regression around a CEO dismissal event. For that, I need to create POST and TREATMENT dummies. POST dummy is equal to 1 for the three years after the ceo_dismiss event (including the year of dismissal) and 0 for three years before the ceo_dismissal event. The TREATMENT dummy should be equal to 1 for all 6 years for firms having the ceo_dismiss event and 0 for all 6 years for firms that do not face a CEO dismissal event. In doing so, i will ignore the observations for which i do not have the data for three prior or post-event data. The data span from 1996 to 2018. Any help is much appreciated.
Here is the data example.
Here is the data example.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long gvkey double year byte ceo_dismiss 1004 1996 0 1004 1997 0 1004 1998 0 1004 1999 0 1004 2000 0 1004 2001 0 1004 2002 0 1004 2003 0 1004 2004 0 1004 2005 0 1004 2006 0 1004 2007 0 1004 2008 0 1004 2009 0 1004 2010 0 1004 2011 0 1004 2012 0 1004 2013 0 1004 2014 0 1004 2015 0 1004 2017 0 1013 1996 0 1013 1997 0 1013 1998 0 1013 1999 0 1013 2000 0 1013 2001 0 1013 2002 0 1013 2003 0 1013 2004 0 1013 2005 0 1013 2006 0 1013 2008 0 1013 2009 0 1034 1997 0 1034 1998 0 1034 1999 0 1034 2000 0 1034 2001 0 1034 2002 0 1034 2003 0 1034 2004 0 1034 2005 0 1034 2006 0 1034 2007 0 1045 2017 0 1045 2018 0 1075 1996 0 1075 1997 0 1075 1998 0 1075 1999 0 1075 2000 0 1075 2001 0 1075 2002 0 1075 2003 0 1075 2013 0 1075 2014 0 1075 2015 0 1075 2016 0 1075 2017 0 1075 2018 0 1078 1996 0 1078 1997 0 1078 1998 0 1078 2002 0 1078 2003 0 1078 2004 0 1078 2005 0 1078 2006 0 1078 2007 0 1094 2015 0 1094 2016 0 1094 2017 1 1111 2003 0 1111 2004 0 1111 2005 0 1111 2006 0 1111 2007 0 1203 1996 0 1209 1996 0 1209 1997 0 1209 1998 0 1209 1999 0 1209 2000 0 1209 2001 0 1209 2002 0 1209 2003 0 1209 2004 0 1209 2005 0 1209 2006 0 1209 2007 0 1209 2008 0 1209 2009 0 1209 2010 0 1209 2011 0 1209 2012 0 1209 2013 0 1209 2014 1 1209 2015 0 1209 2016 0 end
Comment