Announcement

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

  • Is Hausman test necessary when considering the DID (Difference-in-Differences) setting?

    Hi all,

    The question I'm about to ask is an extension to previous thread I've created days ago:
    https://www.statalist.org/forums/for...m-effect-model

    While trying to understand what went wrong with the coefficient sign changing after adding the interaction term, I suddenly recognized that I've missed the most essential part.

    To simply put it, I'm trying to deploy DID (Difference-in-Differences) approach, but I wasn't sure if I should trust result from the command
    Code:
     xtdidreg, fe
    or random effects model.

    1) So far, the main reason I was convinced to use 'random effects model' was that the control and the treatment groups are time-invariant.

    And the
    Code:
     hausman fe re
    returns p-value of 1.

    Click image for larger version

Name:	c1.png
Views:	1
Size:	5.4 KB
ID:	1651294


    However, the Hausman test result is achieved without specifying the
    Code:
     xtreg, fe robust
    the "robust" option.

    I've conducted Hausman test without "robust" option, well because Hausman test didn't work with "robust" option included when saving the results using
    Code:
     est store fe & est store fe  & hausman fe re
    .

    Nevertheless, the p-value from the Hausman test is 1, which I assume I should run random effects model.

    However, is random effects model appropriate for DID setting? (Although I know very little about the econometric setting behind the scene, doesn't DID operate based on fixed effects?)


    2) Using the
    Code:
     xtdidreg
    which I believe was added in the new Stata 17 version, the estimated ATET is exactly the same when I run the fixed effect model with robust standard error option.

    Which should to my understanding yield exactly the same result, as it did:

    Code:
     xtset id date
    Code:
     xtdidreg (OFF_AMT) (treat), group(id) time(date)
    Code:
     xtreg OFF_AMT treat i.date, fe robust
    Click image for larger version

Name:	c2.png
Views:	1
Size:	31.0 KB
ID:	1651297


    Click image for larger version

Name:	c3.png
Views:	1
Size:	24.3 KB
ID:	1651296


    I've generated the "treat" variable as the following:
    Code:
     gen treat = (over == 1 & year == 1)
    Since variable control and treatment groups over == 0 (as control) & over == 1 (as treatment) within the variable "treat" does not vary across time, I thought it would require me to use random effects model or hybrid model to observe the time-varying effects of treatment and control groups.

    It sounded like to me that the treatment & control group specification is similar to that of gender (or any other demographical data) which can easily be found in the health organizational data, as they both are time-invariant.

    So for example, if I were to run a regression with gender variable say
    Code:
     xtreg y i.sex##i.year, fe
    "sex" variable will be omitted but the interaction term will survive.
    And from the previous posts that I've found in this forum seemed to indicate the interpretation of results in such case might differ from simple OLS result
    Code:
     reg y i.sex##i.year
    .

    Given the circumstances would it be appropriate for me to continue with the DID approach using
    Code:
     xtreg, fe
    &
    Code:
     xtdidreg
    ? or should I continue looking for solutions using the hybrid models to incorporate the issues with time-invariant predictors?

    If xtdidreg is indeed way to go, should I include other control variables to control for unobserved heterogeneity? or does the panel fixed effect model takes care of them?


    Any help or advices are appreciated in advance!

    Kind regards,

    Vincent

    Attached Files
Working...
X