Announcement

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

  • Firm & Time Fixed Effects Model in a Difference- in- Difference Framework

    Hello, I just posted this issue in another threat but decided it would be easier to use a new topic.

    I am using a difference in difference framework to investigate the effect of an event on a set of firms.
    My regressions are of the following type:

    Code:
     reg Y Treatment#Postevent ControlVariable1 ControlVariable2 ControlVariable3 if...
    where treatment and postevent are two dummy variables and the if- statement varies in different specifications of the regression.

    I want to use a fixed effects model. The cross-sectional identifier is "FirmID" and the time variable is "quarter".
    Would the following code be correct?


    Code:
    xtset FirmID quarter
    xtreg Y Treatment#Postevent ControlVariable1 ControlVariable2 ControlVariable3 if..., fe
    If i run this regression, Stata excludes 1treatment*1postevent because of collinearity. Does this mean I cannot use a fe model within a DiD analysis?

    Lastly, I have the following questions:
    Does the fe model now control for differences in the cross sectional identifier AND the time variable or only one of them?
    Does the inclusion of fe make the use of firm- specific control variables redundant?

    Help is much appreciated! Thank you in advance!
    Best,
    Chris

  • #2
    Your regressions are wrong. Scrap them and start over. The problem is that you have included the interaction between treatment and postevent, but you have included neither treatment nor postevent themselves. Without those, the model is mis-specified and uninterpretable. Your code should be:

    Code:
    regress Y Treatment##Postevent ControlVariable1 ControlVarible2...

    Now, when you go to a fixed effects model, you will find that Stata will omit treatment due to colinearity with the firm fixed effects. And if you also embellish your model with time fixed effects, you will either lose postevent or one of the time indicators due to colinearity among those. That is OK. But it is best to let Stata make those decisions for you, for two reasons:

    1. Stata won't make a mistake.
    2. People often have errors in their data, and while treatment should be a time-invariant constant within any firm, and postevent should be a firm-invariant constant within any time period, sometimes this is not the case. If there are such errors in the data, Stata will not find the expected colinearity and will not make the corresponding omissions. The occurrence of those terms when they shouldn't be there in the output will be an early warning that your data are incorrectly coded. It is always a good idea to write programs so that they fail as early as possible when there is a problem.

    I will also note that when you -xtset FirmID quarter-, -xtreg- will automatically use FirmID as the panel variable and incorporate fixed effects for that. But it will not include quarter fixed effects. If you want those, you need to add i.quarter to the list of variables in the model.

    And, yes, when you run a -fe- model, any time-invariant attributes of the Firm will be redundant. Specifically, they will be colinear with the FirmID fixed effects and Stata will omit them if you include them. Since Stata will omit them for you, there is no harm done in listing them if you want to. Just don't be surprised when Stata omits them.

    Comment


    • #3
      Hello Clyde,
      That is ineed a serious mistake in my regressions! Thank you for your help!
      Just to get it straight, I am also using a specification with three explanatory variables. Analgously to your response, the correct code should then be

      Code:
      reg Y x1##x2##x3 ...
      ?

      Thanks again!

      Comment


      • #4
        That is correct. The ## operator will cause Stata to include the interaction terms and all lower-order interaction terms, down to the constituent variables by themselves. The # operator creates only the highest order interaction term.

        Comment

        Working...
        X