Announcement

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

  • How to optimize fixed effects model (Diff in Diff)?

    Hi everyone!

    Is there anyone who can help me optimize a STATA code? I am running a region specific time varying fixed effects model which takes ages using 'reg'. Is there a way to run this more efficiently?

    I use a Diff in Diff technique. This is my regression:

    reg outcome treated##post1 i.region##i.year, vce(cl region)

    My panel data includes 391 regions and covers a period of 20 years. Therefore, the i.region#i.year yields a big number of combinations. This makes the regression very time consuming.

  • #2
    Is the treatment at the regional level? If so, this regression doesn’t identify a treatment effect.

    Maybe you have units within region, some treated, some not. Is that true?

    Comment


    • #3
      Cross-posted at https://www.reddit.com/r/stata/comme...fixed_effects/

      It's a rule at Reddit and a request here that you tell people about cross-posting elsewhere.

      Comment


      • #4
        It is true Jeff, the treated units are grid cells within regions!

        Comment


        • #5
          SOLVED: For those interested, "reghdfe" seems to do the trick!

          Comment

          Working...
          X