Hi

I am looking to do two things with a panel dataset of firm-year observations.

1. I would like to set the DealYear as the base period for the variable i.Year in the following regression and normalize the corresponding coefficient to zero. I am interested in the coefficients on the year dummy variables produced.

I understand the command for this if the base year is the same for all firms ie. if the base year = 2010 then we have:

Code:
xtreg investment ib2010.Year i.firmid, fe cluster(firmid)
However, I want the base period to equal the DealYear (see datatex example below), which varies across firms, and I'm not sure how to incorporate this in.


2. I would like to set the omitted variable below to DealYear for the Year variable so as to include coefficients for (t-2*eba), (t-1*eba), (t+1*eba), (t+2*eba) etc - but not (t*eba) where t = DealYear. Again, given that the DealYear varies for each firm, I'm unsure how to incorporate this.

If the DealYear were constant across all firms, such as 2010, I would have:

Code:
xtreg investment i.eba##ib2010.Year, fe cluster(firmid)
Data sample:
Code:
 * Example generated by -dataex-. To install: ssc install dataex clear input float(firmid Year DealYear Investment eba)  1 2005 2006 4 0  1 2006 2006 9 0  1 2007 2006 1 0  1 2008 2006 3 0  1 2009 2006 1 0  1 2010 2006 7 0  1 2011 2006 7 0  1 2012 2006 4 0  2 2005 2009 3 1  2 2006 2009 4 1  2 2007 2009 6 1  2 2008 2009 7 1  2 2009 2009 4 1  2 2010 2009 2 1  2 2011 2009 5 1  2 2012 2009 7 1  3 2005 2009 3 1  3 2006 2009 5 1  3 2007 2009 2 1  3 2008 2009 1 1  3 2009 2009 1 1  3 2010 2009 4 1  3 2011 2009 5 1  3 2012 2009 6 1  4 2005 2011 7 0  4 2006 2011 3 0  4 2007 2011 8 0  4 2008 2011 4 0  4 2009 2011 7 0  4 2010 2011 8 0  4 2011 2011 3 0  4 2012 2011 2 0  5 2005 2009 5 1  5 2006 2009 8 1  5 2007 2009 3 1  5 2008 2009 3 1  5 2009 2009 9 1  5 2010 2009 9 1  5 2011 2009 1 1  5 2012 2009 7 1  6 2005 2006 4 1  6 2006 2006 9 1  6 2007 2006 1 1  6 2008 2006 3 1  6 2009 2006 1 1  6 2010 2006 7 1  6 2011 2006 7 1  6 2012 2006 4 1  7 2005 2008 3 1  7 2006 2008 4 1  7 2007 2008 6 1  7 2008 2008 7 1  7 2009 2008 4 1  7 2010 2008 2 1  7 2011 2008 5 1  7 2012 2008 7 1  8 2005 2007 3 1  8 2006 2007 5 1  8 2007 2007 2 1  8 2008 2007 1 1  8 2009 2007 1 1  8 2010 2007 4 1  8 2011 2007 5 1  8 2012 2007 6 1  9 2005 2011 7 0  9 2006 2011 3 0  9 2007 2011 8 0  9 2008 2011 4 0  9 2009 2011 7 0  9 2010 2011 8 0  9 2011 2011 3 0  9 2012 2011 2 0 10 2005 2010 5 1 10 2006 2010 8 1 10 2007 2010 3 1 10 2008 2010 3 1 10 2009 2010 9 1 10 2010 2010 9 1 10 2011 2010 1 1 10 2012 2010 7 1 end
Any advice appreciated