Announcement

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

  • Seperating Dataset or Not

    Dear Users,

    I have a panel data ranging from 2001 to 2010. For comparative purposes, I want to use -fe- estimates for before 2005 (2001-2004) and 2005 onwards (2005-2010). In that case, can I use the following commands with my full-sample dataset?
    Code:
    xtreg Y X1 X2 X3, fe cluster (ID), if Year<=2004
    Code:
    xtreg Y X1 X2 X3, fe cluster (ID), if Year>=2005
    Or, should I seperate the whole dataset into two different files on the basis of years, and then run the equation without the 'if' suboption.

    Thanks.

  • #2
    You will get the same results either way. It's a question of which is more convenient.

    That said, if you want to do a statistical comparison of some of the effects from 2001-2004 vs 2005-2010, then neither of these approaches will work. If that is your goal, then you need to do something like this:

    Code:
    gen byte era = (Year >= 2005) if !missing(Year)
    regress Y i.era##(c.(X1 X2 X3) i.ID)
    and then examine the results for the interaction terms to see how different the effects are in the two eras.

    Comment


    • #3
      Many thanks, Clyde for your quick and easy-to-understand response.

      Comment

      Working...
      X