Announcement

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

  • rehdfe option estfe returns indicater _cons in table

    Hi

    This may be too niche for you all to help, but I'll give it a shot. I'm using two user-written commands, available through SSC: reghdfe and esttab (the latter is a part of the estout package). As you may or may not know, reghdfe has an undocumented option, estfe, that posts a list of absorbed variables to `r(indicate)' for use with the esttab option indicate() (read more). Now, when using that with my model, I somehow end up with a row in my estimation table that says _cons and has a yes for my OLS estimation and a no for the rest. I've posted code and output below. As I work on a research PC that I can't copy from, please note that the output is something I've produced myself to mirror my layout issue without giving away information that I can't give away.

    Code:
    eststo _1: reghdfe outcomevar explvar, vce(cl id)
    eststo _2: reghdfe outcomevar explvar, a(industry) vce(cl id)
    eststo _3: reghdfe outcomevar explvar, a(industry year) vce(cl id)
    
    estfe *, labels(industry "Industry FE" year "Year FE") 
    esttab _1 _2 _3, nogap not noconstant indicate(`r(indicate)')
    (1) (2) (3)
    explvar 1.03 0.88 0.85
    Industry FE No Yes Yes
    Year FE No No Yes
    _cons Yes No No
    Observations 100,000 100,000 100,000

    To be clear, I'm wondering why I get that _cons row. Removing the noconstant option from esttab doesn't change anything.

    Best,
    Rune

  • #2
    Should there not be a constant in OLS? I vote yes. The -nocons- option suppresses the coefficient, but you asked for a label for the constant by including the OLS regression in the estfe command. You should instead:

    Code:
    estfe _2 _3, labels(industry "Industry FE" year "Year FE")
    esttab _1 _2 _3, nogap not noconstant indicate(`r(indicate)')

    Comment


    • #3
      Originally posted by Andrew Musau View Post
      Should there not be a constant in OLS? I vote yes. The -nocons- option suppresses the coefficient, but you asked for a label for the constant by including the OLS regression in the estfe command. You should instead:

      Code:
      estfe _2 _3, labels(industry "Industry FE" year "Year FE")
      esttab _1 _2 _3, nogap not noconstant indicate(`r(indicate)')
      Thank you, Andrew, that works! And I understand why it was happening now. Good spot!

      Also, to be clear, I do want a constant in my OLS regression. I just dont want to report it.

      Comment

      Working...
      X