Announcement

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

  • Difference in Difference Analysis with Panel Data via REGHDFE, missing significance.

    Hello everyone,

    I am currently writing my Master Thesis and I try to explore the effect of leaving a trade agreement on trade flows. Therefore I collected panel data from 2000-2013 for 2 different countries. My independent variable is imports and my dependent variable of interest is the dummy exitATPDEA, which turns 1 if the treatment applies. I am using HS-6 digit data and have the trade flows precisely for roughly 5500 product categories. My id grouping includes productcode and country.

    My question: My professor recommended me to use the reghdfe command in stata to explore my independent and depend variable. However, when I run the following code:

    reghdfe limports exitATPDEA i.year, absorb(id) vce(robust)

    , I don't get significant results. When I do the same with the normal xtreg command my result are significant. What could be possible reasons for my insignificant results?

    So far I have only come up with that I might have an unbalanced data set in which my treatment observations are underrepresented. Furthermore, I read that with reghdfe one should have more than 50 clustering groups. Since I am new to this, I do not know how many groups I have.

    Overall, I am pretty lost with this approach since, even after reading up the paper by Correia and the help page, I do not seem to get the grip of why I need to apply reghdfe in my model.

    I know that these questions are on the beginners level but I would anyway appreciate any comments on my post. Thank you so much in advance. Kind regards.






    Click image for larger version

Name:	Screenshot 2019-03-12 at 18.24.21.png
Views:	2
Size:	89.3 KB
ID:	1487752






    Attached Files

  • #2
    You didn't get a quick answer. You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. Avoid posting picture or attaching files. I don't know what your panel variable

    You don't seem to know what you are doing. You say " My independent variable is imports and my dependent variable of interest is the dummy exitATPDEA, which turns 1 if the treatment applies." Except you have this backwards - the dependent variable is imports. This level of error makes it questionable whether anything we could do to help would really work.

    If all you have is one panel variable and year, there is not need for reghdfe - xtreg works find.

    I strongly suspect your modelling is not sufficiently sophisticated. Exit should change imports but not necessarily explain the level of imports well. I also don't see how your sample size and number of panels in the estimation fits what your description.

    Comment


    • #3
      Three things:
      1. I don't see your xtreg code but I'm assuming you ran it with robust SEs and the fe option. Now,
        Code:
        xtreg ... , ... fe
        automatically replaces vce(robust) with vce(cluster id) (see its help file for why). reghdfe doesn't use the xt information, so it doesn't do this. If you run reghdfe with vce(cluster id) it will give you closer results
      2. reghdfe drops singleton observations (404 obs in your case), which affects the small sample adjustment to the variance-covar matrix. If you want to double check how it looks without that correction, you can run reghdfe with the "keepsingletons" option and you should get the exact results as xtreg
      3. Unless you are using the year estimates for something, you can just run "reghdfe y x, absorb(id year)"; that's the key benefit of reghdfe vs xtreg/areg (absorbing multiple fixed effects).
      Best,
      Sergio

      Comment


      • #4
        Hello, sweetheart. I'm also using reghdfe to run a difference in difference model where both the individual and time fixed effects are controlled. As a result of the collinearity problem with fixed effect, the treat and post terms were omitted from my estimation result. Is there any method to measure the treat and post term coefficients? I looked through several literature and it appears that Hausman Taylor can be used to estimate these time invariant or individual invariant variables, but not with reghdfe. Your response to this question is greatly appreciated.
        And my regression model look like as follwing:
        reghdfe sales_spec did treat post $X1list, absorb(i.code i.year i.product) vce(cl province)
        The $X1list is a list of time-varying covariates. The treat and post terms were omitted when I ran the model. I'm just wondering whether there's a way to manage both individual and time-fixed effects while getting the coeffieint of treat and post term with reghdfe?

        Comment


        • #5
          Originally posted by Sergio Correia View Post
          Three things:
          1. I don't see your xtreg code but I'm assuming you ran it with robust SEs and the fe option. Now,
            Code:
            xtreg ... , ... fe
            automatically replaces vce(robust) with vce(cluster id) (see its help file for why). reghdfe doesn't use the xt information, so it doesn't do this. If you run reghdfe with vce(cluster id) it will give you closer results
          2. reghdfe drops singleton observations (404 obs in your case), which affects the small sample adjustment to the variance-covar matrix. If you want to double check how it looks without that correction, you can run reghdfe with the "keepsingletons" option and you should get the exact results as xtreg
          3. Unless you are using the year estimates for something, you can just run "reghdfe y x, absorb(id year)"; that's the key benefit of reghdfe vs xtreg/areg (absorbing multiple fixed effects).
          Best,
          Sergio
          Hello, sweetheart. I'm also using reghdfe to run a difference in difference model where both the individual and time fixed effects are controlled. As a result of the collinearity problem with fixed effect, the treat and post terms were omitted from my estimation result. Is there any method to measure the treat and post term coefficients? I looked through several literature and it appears that Hausman Taylor can be used to estimate these time invariant or individual invariant variables, but not with reghdfe. Your response to this question is greatly appreciated.
          And my regression model look like as follwing:
          reghdfe sales_spec did treat post $X1list, absorb(i.code i.year i.product) vce(cl province)
          The $X1list is a list of time-varying covariates. The treat and post terms were omitted when I ran the model. I'm just wondering whether there's a way to manage both individual and time-fixed effects while getting the coeffieint of treat and post term with reghdfe?

          Comment

          Working...
          X