Announcement

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

  • Add FE row in Stata esttab without using estadd

    Hi everyone.

    Hope you have a nice day.

    I tried to add a row at the bottom of the table output by -esttab- to mark the model used, such as using Yes/No to identify with or without fixed effects.

    This is what I do now.

    Code:
    reghdfe y x , a(year) ...
    est store m1
    estadd local yearfe "Yes"
    
    // after quite a few similar models on different "Y"
    reg...
    
    
    esttab m* uisng moldels.rtf, replace stats(N yearfe, label("Obs." "Year FE") fmt(%9.0fc %3s))
    But I wish to avoid using the -estadd- command.
    This requires me to use multiple lines of commands after estimating each model (-est store- and multiple -estadd-, if more than one FE is used.)
    Can I declare the lines (FEs, maybe other texts in other situations) I wish to add in the -esttab- command instead of using -estadd-?

    BTW, if I use: reg y x i.year.
    Can anyone remind me which parameter I can use not to show the result of i.year in -esttab- but tag it in the foot?

    Thanks!

    Cheers,
    Hall

  • #2
    estout is from SSC, as you are asked to explain in FAQ Advice #12. If you are using an estimator such as regress where you include the fixed effects as indicators, then you can use the -indicate()- option of estout.

    Code:
    help estout
    On the other hand, if you are absorbing the fixed effects, you will need to identify what is absorbed.

    Comment


    • #3
      You can use the indicate() option of esttab to tag coefficients in the footer instead of including them as results. The problem is that absorbed fixed effects don't have coefficients. But there is a solution: reghdfe comes with a helper command, estfe, which modifies estimation results to include dummy coefficients for fixed effects. You only need to run estfe once, directly before you run esttab.

      http://scorreia.com/software/reghdfe...ttab-or-estout

      Code:
      reghdfe y x , a(year) ...
      est store m1
      
      // after quite a few similar models on different "Y"
      reg...
      
      estfe m*, labels(year "Year FE")
      esttab m* uisng moldels.rtf, replace indicate(`r(indicate)')

      Comment


      • #4
        Originally posted by Andrew Musau View Post
        estout is from SSC, as you are asked to explain in FAQ Advice #12. If you are using an estimator such as regress where you include the fixed effects as indicators, then you can use the -indicate()- option of estout.

        Code:
        help estout
        On the other hand, if you are absorbing the fixed effects, you will need to identify what is absorbed.
        Thanks!

        Comment


        • #5
          Originally posted by Nils Enevoldsen View Post
          You can use the indicate() option of esttab to tag coefficients in the footer instead of including them as results. The problem is that absorbed fixed effects don't have coefficients. But there is a solution: reghdfe comes with a helper command, estfe, which modifies estimation results to include dummy coefficients for fixed effects. You only need to run estfe once, directly before you run esttab.

          http://scorreia.com/software/reghdfe...ttab-or-estout

          Code:
          reghdfe y x , a(year) ...
          est store m1
          
          // after quite a few similar models on different "Y"
          reg...
          
          estfe m*, labels(year "Year FE")
          esttab m* uisng moldels.rtf, replace indicate(`r(indicate)')
          That's AMAZING!
          Thanks!

          Comment

          Working...
          X