Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Choosing reference/base periods in panel data and normalizing the corresponding coefficient to zero

    Hi

    I am looking to do two things with a panel dataset (c350 firms and annual data from 2008 to 2016).

    1. I would like to set 2011 as the base period for the variable i.Year in the following regression and normalize the corresponding coefficient to zero:

    Code:
    xtreg inv i.Year i.company, fe cluster(company)
    I am interested in the coefficients on the year dummy variables above.


    2. I would like to set the omitted variable below to 2011 for the Year variable so as to include coefficients for (2008*eba), (2009*eba), (2010*eba), (2012*eba), (2013*eba) etc - but not (2011*eba). The dummy variable eba takes the value 1 or 2 and the year variable takes values from 2008 to 2016.

    Code:
    xtreg inv i.Year i.comp eba#i.Year, fe cluster(comp)

    I have seen other posts looking at setting reference periods, but none of the posted solutions seemed to work on my data, so I was wondering if the solution was different.

    Any advice would be very much appreciated,
    Thanks
    Paul

  • #2
    Code:
    xtreg inv ib2011.Year i.comp, fe cluster(comp)
    xtreg inv i.comp i.eba##ib2011.Year, fe cluster(comp)
    Note: the interaction model I have coded here may be different from what you wrote, but if so, yours is mis-specified. If the variable eba is a time-invariant attribute of the panel variable used in your -xtset- command, then the two models are equivalent. But if eba can vary over time within a panel, then the model you coded with it in #1 is mis-specified because it omits mention of eba outside the interaction. Do notice the important distinction between ## and #. Both that and the specification of base levels of factor variables are explained in greater detail at -help fvvarlist-.

    Comment


    • #3
      The eba dummy is indeed time-invariant.

      Many thanks Clyde.

      Comment


      • #4
        Hi Clyde/other Stata users,

        I have a similar issue to the above, however I now have the added complexity of using a panel data set where i would like the base period to be different for each firm within the panel.

        The data is an example using dataex - I would like the base period to be set the the DealYear for each firmid, which differs across firms. I wasn't sure if this was possible to do so.


        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 is apreciated.

        Comment

        Working...
        X