Announcement

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

  • Generalized DID for movers: individual or location fixed effects?

    I have a panel consisting of individuals who moved at some point within the panel's time frame, where the panel ID (id) represents individuals, and the time ID (date) represents days of the year. The average number of observations per year for each id is 2 (this doesn't mean that the person moves twice; just that their data is updated twice). I want to understand the impact on the individual binary variable y (for example, being married) of moving to a neighborhood with attribute X versus attribute Z, using the difference-in-differences method. It's important to note that this attribute can take other values (such as W and K) and varies yearly. In other words, the treatment is at the neighborhood-year level. Since people move at different times, I understand that the correct approach is a generalized DID with two-way fixed effects.

    From my understanding (please feel free to correct me if I'm wrong), I should run:

    sort id date
    xtset id date
    gen treat = haveMoved*X
    reghdfe y treat if inlist(attribute, X, Z) & inlist(event_t, -1, 0), absorb(date id) cluster(neighborhood#yearMove)

    Where haveMoved equals 1 if the person has already moved and 0 otherwise, treat represents having moved to a neighborhood with attribute X, event_t == 0 is the observation when the move occurs, and yearMove is the year of the move, so to cluster at the treatment level. My questions are:

    1) Should I include fixed effects for neighborhoods, or would it be redundant since individual fixed effects are necessary for TWFE?

    2) I ask the same question as (1) for year fixed effects, since I include date fe.

    3) Is the approach of only keeping periods -1 and 0 in the estimation correct?

    I genuinely appreciate any help anyone can provide.

  • #2
    Hi Luiza.

    1) and 2) seem correct: individual fe and time fe seem fine. Year FE would be collinear with the date indicator you absorb. Neighborhood fe for a fixed date would be collinear with the individual fe. For multiple dates, since the data has movers, neighborhood fe won't be collinear with the individual fe, but the individual fe would be the ones needed here to do a TWFE analysis at the individual level.

    3) I don't think you want to restrict the dataset to only event_times -1 and 0: you want to use all the dates as to observe outcomes for the individuals a few periods after the move when available.

    Jorge Eduardo Pérez Pérez
    www.jorgeperezperez.com

    Comment


    • #3
      Thank you so much Jorge!

      Comment

      Working...
      X