Announcement

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

  • panel data fixed effect

    Dear all
    I am encountered with a pproblem when runing panel-data DID regression. When I try to absorb year month FE, two different way of absorbing leads to different coefficient estimation (and these two estimations vary from each other a lot)

    My question is, what would be the reason for this?

    Here is the code that I use:

    [CODE]
    reghdfe lnwage shock Controls , absorb( ID year month) cluster(ID) resid
    reghdfe lnwage shock Controls , absorb( ID year_month) cluster(ID) resid
    [END]

    Thanks a lot!
    Last edited by Olivia Li; 18 May 2022, 09:03.

  • #2
    Uh in your first example you use id year and month fixed effects, in your second one you use id and year-month fixed effects. I don't know why you'd want to do it like this, for your first example you have ID-1 year-1 and 12-1 predictors, and in your second example you have ID-1 and however many year-month predictors there are.

    So, that's why

    Comment


    • #3
      Olivia:
      your first code includes three fixed effects (-panelid-, year and month), whereas the second one includes -panelid- + an interaction between year and month (that I find difficult to justify unless you have relevant seasonality differences across months ).
      That said (and without knowing the rests of the outcome that the community-contributed module -reghdfe- gave you back), I would stick with your 1st code.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Originally posted by Jared Greathouse View Post
        Uh in your first example you use id year and month fixed effects, in your second one you use id and year-month fixed effects. I don't know why you'd want to do it like this, for your first example you have ID-1 year-1 and 12-1 predictors, and in your second example you have ID-1 and however many year-month predictors there are.

        So, that's why
        Hi, Jared, the reason I wanna do this in second regression is that I assume each month in each year has a fixed effect. And in the first regression, I assume there is no difference in the same month in different years.
        And soory, I am a little confused with the "why" part that you said.

        Comment


        • #5
          Carlo put it more eloquently than I did, but when you include year-month fixed effects, you're essentially including unit specific linear trends.

          Example? Say we have 4 units and 10 years. Two way fixed effects means we have 3 unit and 9 time dummies. If we had unit_year fixed effects, we now have one indicator, per state, per year. Or, 26 predictors if my mathematics is right

          Comment


          • #6
            Originally posted by Carlo Lazzaro View Post
            Olivia:
            your first code includes three fixed effects (-panelid-, year and month), whereas the second one includes -panelid- + an interaction between year and month (that I find difficult to justify unless you have relevant seasonality differences across months ).
            That said (and without knowing the rests of the outcome that the community-contributed module -reghdfe- gave you back), I would stick with your 1st code.
            Hi Carlo, thanks for your kind reply.
            It seems that year_month FE (the 2nd one) controls more variations than year month FE (the 1st one), so I am not sure if 1st is the right one. (Although I am with you for the point that the hypothesis of the 1st one complies with economic intuition more than the 2nd one.)

            Comment


            • #7
              You'd only use regression 2 if you think there's legit seasonality. Like year and month specific confounding.

              Comment


              • #8
                Olivia:
                it's difficult to advise any further without taking a look at your regression outcome table.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X