Announcement

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

  • how to indicate specific variables when using reghdfe and estfe?

    Hi there,

    I have a question regarding the use of reghdfe and esttab. Right now I have a bunch of continuous numeric controls but also a bunch of categorical ones:
    Code:
    local controls "apple banana orange"
    reghdfe depvar var1 var2 va3,absorb(`controls' county year)
    estimates store model1
    estfe model1,labels(county "County FE" year "Year FE")
    esttab model1,indicate(`r(indicate_fe)')
    In this case, How do I indicate the controls as a whole? Otherwise every variable in the controls will be indicated separately, which will make the table quite redundant. Thanks!

  • #2
    Sergio Correia Hi Sergio, would you please share some advice? Thanks!

    Comment


    • #3
      Well you cannot absorb controls as they shouldn't go in absorb but in the main regression.. you need to do "reghdfe depvar y x1 x2 .. apple banana .. absorb(county year)"

      Comment


      • #4
        Originally posted by Sergio Correia View Post
        Well you cannot absorb controls as they shouldn't go in absorb but in the main regression.. you need to do "reghdfe depvar y x1 x2 .. apple banana .. absorb(county year)"
        Thanks for responding! So apple banana here is a bunch of unimportant categorical control variables, I can leave them out in the main regression, but since I wouldn't want to report their statistics in the results so I guess it might be better to just absorb them.

        Comment


        • #5
          Let's set aside the issue of what the properties of the `controls' are. It's standard to suppress controls in some tables, and Sergio's advice will help you do it.
          Just put the controls in the regression and then use the indicate option and the drop option together to control the output.
          Code:
            
          local controls "apple banana orange"
          reghdfe depvar var1 var2 va3 `controls',absorb( county year)
          estimates store model1
          estfe model1,labels(county "County FE" year "Year FE")
          esttab model1,indicate(`r(indicate_fe)' Controls=apple) drop(banana orange)
          Note that this is only a very slight variation on the example Sergio provides in his documentation.
          Last edited by Arthur Morris; 26 Mar 2020, 23:53. Reason: added link to docs

          Comment

          Working...
          X