Announcement

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

  • Question about reghdfe and dropping a dummy?

    Hi all,

    I have a short question, does Stata drop a dummy automatically when using the reghdfe as it does for reg in order to avoid multicollinearity?
    As I went through the paper of the reghdfe author but didn't find anything about this matter

    thanks

  • #2
    I don't know if it explicitly drops the dummy (the behind the scenes machinery is rather different from standard OLS estimation), I'm fairly sure however that you don't need to worry about it. Sergio Correia will know more about this, but I don't know if he still checks the Stata forum.

    Comment


    • #3
      Tilo:
      as -reghdfe- is an user-writtem command, please tell the list where you got it from and which release you're using (if feasible).
      The reasons for this seemingly pedantic remark are reported in the FAQ.
      That said, as Jesse has already pointed out, Sergio's post appear from time to time on this list: I would consider e-mailing him privately at the same address reported at -net describe reghdfe, from(http://fmwww.bc.edu/RePEc/bocode/r)-.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Dear Tilo,
        Based on what i know about the -reghdfe- command, and my own version -regxfe- command, it is required to drop the variables that are collinear with the FE.
        In my version of the algorithm, I estimate the model by an iterative demeaning process. If a particular variable is colinear with the fixed effect list, and you don't drop it, two things may happen.
        1. if the first iteration is to be demean with the FE it is collinear with, the process ends, because the demeaned variable will be fully absorbed by the fixed effect.
        2. if the first iteration is with other FE (not the one it is collinear with), then the process might end up with multiple and unnecessary iterations, which will end up fully absorbing it too.
        Hope this helps
        Fernando

        Comment


        • #5
          Hi Tilo,

          -reghdfe- first demeans each variable, then runs the regression, and at the end it runs StataCorp's builtin _rmcoll to remove collinear variables. This usually does the right thing, but sometimes the demeaning step doesn't end up with a variable that is 0.000 in every observation, but something like " -1e-32, +1e-16 " (very small numbers). If this is not picked up by _rmcoll (which was not designed for these cases), then the collinear regressor is not dropped. That said, you will see a variable with enormous standard errors, so it's relatively easy to spot this problem.

          A short-term solution would be to run reghdfe with a higher tolerance so the transformed variables end up closer to zero. Later on, I'll implement a better solution which replaces _rmcoll with the version written by the authors of -ivreg2- (they also faced the same problem).

          Cheers,
          Sergio

          Comment


          • #6
            Dear all,
            Thanks for your answers.

            Originally posted by Carlo Lazzaro View Post
            Tilo:
            as -reghdfe- is an user-writtem command, please tell the list where you got it from and which release you're using (if feasible).
            The reasons for this seemingly pedantic remark are reported in the FAQ.
            That said, as Jesse has already pointed out, Sergio's post appear from time to time on this list: I would consider e-mailing him privately at the same address reported at -net describe reghdfe, from(http://fmwww.bc.edu/RePEc/bocode/r)-.
            Carlo, thank you for your reply. It is: - 3.2.9 21feb2016 - the version of reghdfe I use.

            Jesse, I just need to be sure cause I'm explaining the procedure in my paper, as I do when I use reg with fixed effects. Cause in reg I choose which fixed effects dummy to drop but here I can't. So, I want to be clear that I can say that Stata drops a fixed effect dummy in reghdfe. And, the wierd thing is that sometimes it reports in the output that it dropped a dummy but sometimes not!

            Fernando, thanks for your answer. Reghdfe sometimes reports that it dropped a dummy and sometimes not. So, it didn't happen that it ever ended the process for such matters.


            best

            Comment

            Working...
            X