Announcement

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

  • Should I use intersected-FEs in DID design?

    Dear all,

    Hi!

    I am trying to implement a DID test using city-year panel data (balanced). Here are the models and corresponding codes:

    treat: =1 for treated cities. 0 otherwise.
    post: =1 for when and after the shock. =0 for prior to the shock (policy).
    DID = treat*post

    Model 1:
    reghdfe Y DID, a(treat post)

    Model 2:
    reghdfe Y DID, a(treat post country)

    Model 3:
    reghdfe Y DID, a(country#treat country#post)

    Model 4:
    reghdfe Y DID, a(country#treat post)

    What I am trying to do in models 2 and 3 is to compare the Treated Cities and Control Cities only within the same country.
    Is model 2 enough for my goal? When and why are models 2 and 3 different, and when are they identical?


    Kind regards,
    Hall

  • #2
    I figured this out. Simply adding a country FE does not ensure that you are implementing "within-country DID". But the Model 3 does.
    However, the ATT calculated using the interacted fixed effects is still the average of the countries.
    If you (or I, since it is the question I posted myself here...) suspect that the treatment effect of a policy varies greatly across countries, you should try more heterogeneity analysis.

    Comment


    • #3
      Right, Xinhao. Nice post. And in the third analysis you’re allowing for country-specific violation of parallel trends. You could even interact country dummies with time dummies, but for estimating one post-intervention effect per country, I think it’s the same. If you want an event-study type estimation, you can include interactions with the time period dummies — if you have more than one post-treatment period.

      Comment


      • #4
        Originally posted by Jeff Wooldridge View Post
        Right, Xinhao. Nice post. And in the third analysis you’re allowing for country-specific violation of parallel trends. You could even interact country dummies with time dummies, but for estimating one post-intervention effect per country, I think it’s the same. If you want an event-study type estimation, you can include interactions with the time period dummies — if you have more than one post-treatment period.
        Thank you. Prof. Wooldridge.

        Yes,​ I have multiple time periods in my dataset (about 20 years).
        ​​​​​​I understand that DID can be implemented by employing TWFE or even FEs for higher dimensions. For instance, I can do
        Code:
        // model TWFE
        reghdfe Y did, a(city country#year)
        For the event-study model,
        Code:
        // Model event-study TWFE
        reghdfe Y pre3 pre2 pre1 o.post0 post1 post2 post3, a(city country#year)
        But I also think that "a(treat post)" or "a(treat country#post)" is actually saturated enough for DID estimation. Right? Are TWFE always better than simply "a(treat post)"? (maybe that's why it is so popular now?)

        Kind regards!
        Hall

        Comment


        • #5
          Sorry for misspelling your name in my reply; I'll try to be more careful. In my 2021 working paper on TWFE, I showed that, even an the staggered case, absorbing by cohort dummies is the same as absorbing by the unit (city) in your case -- as long as the panel is balanced. So, as you say, TWFE is not necessary in many cases. In the common timing case, the equivalence means you only have to absorb what you're calling "treat." If you want the effects to vary across the treatment period, you should absorb by year, not just "post."

          The flexible TWFE approach has some benefits for unbalanced panels and it's no longer the same as absorbing (treat, post)

          Comment


          • #6
            Thank you. It's very helpful, especially the insight you provided about the difference in model assumptions between controlling for -post- FE and -year- FE. Very enlightening for me.
            Previously, I control for fixed effects mainly to mitigate concerns about unobservable omitted variables. Now, I realize that they have different implications in the context of the DID model. I will read your paper to deepen my understanding.
            Thank you.

            Kind regards,
            Hall

            Comment

            Working...
            X