Announcement

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

  • Panel regressions with an interaction term between a time dummy variable and a time invariant variable

    This question is cross posted here: https://stats.stackexchange.com/ques...riable-and-a-t


    The question is methodological but also computational. First of all, I want to understand the interpretation between an interaction term of an individual and a time dummy within a fixed effect analysis. In particular, the regression I have is the following:

    Code:
     xtreg Y X i.date  1.D#1.C, fe vce(robust)
    where both Y and X vary over time and individuals, date corresponds to time dummies to control for time fixed effects and the last interaction term comprises C, a individual dummy that classifies groups; and D a time dummy equalling 1 from an specific time event ( a shock) on.

    To bring more intuition, lets call Y=log(wage) and D=1 if male. I am interpreting the coefficient of the interaction term (times 100) as the percentage increase in the wage gap across sex after the time shock occurred.

    Is this interpretation correct? How can I be sure that stata is setting the base categories properly?


    PS: You can also see in the link at stackexchange how I tried to formally prove this interpretation.


    Last edited by Luis Menendez; 04 Jul 2021, 12:18.

  • #2
    I am interpreting the coefficient of the interaction term (times 100) as the percentage increase in the wage gap across sex after the time shock occurred.

    Is this interpretation correct?
    It is approximately correct. The interaction coefficient is the change in the gap in ln(wage) after the time shock represented by C. Now, assuming that coefficient is small (say < 0.10 in magnitude), then that is almost equal to the percentage change in the gap in wage itself. But if the coefficient is not small, the approximate equality between difference in ln X and percent difference in X begins to break down, and fails rather badly if the magnitude of the coefficient is .25 or higher. So if you want an exact statement, the percent change in the wage gap would be 100*(exp(coefficient) - 1).

    How can I be sure that stata is setting the base categories properly?
    Just inspect the output of the -xtreg- command to see which levels of C and D are omitted. Alternatively, if you want to explicitly force the base categories to your preferred values, use the ib#. notation: see -help fvvarlist- for details.

    Comment


    • #3
      Thanks for the answer Clyde. Sorry I forgot about the approximation, you're totally right.

      With respect to the base categories, which one should be set in order for the interpretation to be the one I mentioned? My intuitition ( according to the "proof" i tried in the stackoverchange link) would be to do:


      Code:
       xtreg Y X i.date  ib0.D#ib0.C, fe vce(robust)
      However the stata output for this returns:

      Code:
                                
                  Y |      Coef.            Std. Err.      t    P>|t|        [95% Conf. Interval]
                D#C |
               0 1  |  -.0237658            .0138841    -1.71   0.088    -.0510866     .003555
               1 0  |          0  (omitted)
               1 1  |          0  (omitted)

      which seems to be taking as base category C=1 and D=1?
      Last edited by Luis Menendez; 05 Jul 2021, 10:39.

      Comment


      • #4
        Oh, sorry. I misread the code in the original post. The way to go is with the ## operator, not the # operator. Then with ib0.D##ib0.C you will get more understandable results.
        Code:
        xtreg Y X i.date ib0.D##ib0.C, fe vce(robust)
        You will find that both 1.D and 1.C are also omitted with this code due to colinearity with the fixed effects and the i.date effects, respectively. But the 1.D#1.C interaction term will survive and its interpretation is as you describe in #1.

        Comment


        • #5
          Originally posted by Clyde Schechter View Post
          Oh, sorry. I misread the code in the original post. The way to go is with the ## operator, not the # operator. Then with ib0.D##ib0.C you will get more understandable results.
          Code:
          xtreg Y X i.date ib0.D##ib0.C, fe vce(robust)
          You will find that both 1.D and 1.C are also omitted with this code due to colinearity with the fixed effects and the i.date effects, respectively. But the 1.D#1.C interaction term will survive and its interpretation is as you describe in #1.
          Thanks a lot this is precisely what I was looking for!

          Comment

          Working...
          X