Announcement

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

  • reghdfe and _cons

    Hi All,

    I am a bit confused as to what the _cons in the reghdfe output refers to. I need to recover the fixed effects and do some calculations on them. Ideally, I would like to run reghdfe without a constant so I can get the right values of the fixed effects but I don't seem to see that option. So in order to manipulate my fixed effects so I can get the right numbers, I need to understand how _cons is calculated. To recover the right fixed effects, should I add _cons to all the fixed effects values? Another option would be if I could set the constant to 0 so that my fixed effects were calculated correctly - is there any way to do that?

  • #2
    How large are your dimensions? If not too large, you can use reg and put in all dummies without a constant. Or, use xtreg.

    Comment


    • #3
      Code:
      clear
      sysuse auto
      reghdfe price mpg weight , absorb(fe1 = rep78) noconstant
      reghdfe price mpg weight , absorb(fe2 = rep78)
      summ fe1 fe2
      You'll see that the mean of fe1 is the constant, and the fe1 are the constant + fe2.

      From the help file about the stored fixed effects: " Please be aware that in most cases these estimates are neither consistent nor econometrically identified."

      G

      Comment


      • #4
        Thanks - my dataset is indeed very large and I have many fixed effects to compute. My understand was that the noconstant option is merely cosmetic wrt reporting but that the underlying model still computes a constant. So if the mean of fe1 is the constant, does that mean fe1 is normalised wrt the mean?

        Comment


        • #5
          Hi Shreya
          what reghdfe does is a bit different
          1. it normalizes the fixed effects so they have a mean zero
          2. the constant is what you would obtain if you interne an all variables but add the grand mean back
          if you were to just used demeaned variables there will be no constant
          hth
          Fernando

          Comment


          • #6
            Hi Fernando, thanks - could yo clarify point 2? There seems to be a typo.

            Comment


            • #7
              Sorry I meant
              the constant is what you get after demeaning all variables and adding the grand mean
              that is how the constant is obtained

              Comment


              • #8
                Thanks. Could you please confirm if my understanding is correct - the fixed effects in reghdfe are calculated for all categories and then the mean of the fixed effects is stored as a constant. There is no category that is omitted.
                If this is wrong and a category is omitted which is then the reference category whose effect is stored in the constant, how do I see which category is the omitted category?

                Comment


                • #9
                  Shreya:
                  you may find the following useful: FAQ: Interpreting the intercept in the fixed-effects model | Stata
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment

                  Working...
                  X