Announcement

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

  • etable: adding a row to indicate whether control variables are included (like indicate() for estout)

    Hello everyone,

    appologies if this is trivial, but have not been able to figure this out.

    I am trying to use etable to produce regression output and would like to include a row indicating whether certain controls are included in a specific model - without showing the results for those specific controls.

    In estout/esttab this was achived with the option indicate(), but I cannot find an equivalent for etable which does have a keep() option but does not seem to have an obvious way to indicate which regressors are included but not reported.

    Thank you in advance for your help.

  • #2
    I use estadd, part of estout from SSC to insert this information into the estimation results below.

    Code:
    webuse lbw, clear
    eststo m1: regress bwt age lwt i.smoke i.ptl
    estadd local FE= "No": m1
    etable, cstat(_r_b) cstat(_r_se, nformat(%7.2f)) mstat(N) mstat(r2) mstat(FE)
    Res.:

    Code:
    . etable, cstat(_r_b) cstat(_r_se, nformat(%7.2f)) mstat(N) mstat(r2) mstat(FE)
    
    ----------------------------------------
                                       bwt  
    ----------------------------------------
    Age of mother                     10.424
                                      (9.83)
    Weight at last menstrual period    3.734
                                      (1.71)
    Smoked during pregnancy                 
      Smoker                        -229.903
                                    (105.75)
    Premature labor history (count)         
      1                             -457.230
                                    (155.92)
      2                             -115.181
                                    (317.91)
      3                              887.831
                                    (703.41)
    Intercept                       2363.787
                                    (295.97)
    Number of observations               189
    R-squared                           0.12
    FE                                    No
    ----------------------------------------

    Comment


    • #3
      Thanks for this. Indeed, I had thought about something along those lines, but this requires manual intervention for each model - i.e. after each model you have to manually estadd the information. As I am running various models with different controld, I was hoping to automate this pretty much in the indicate() fashion. If there is no built-in option to do so in etable, I suppose the solution lies in using estadd as you say within a loop that checks whether certain variables appear in the list of regressors of the given model.

      If anyone has worked out an efficient way of automating this task, please let me know.

      Thanks again for the very helpful input.
      Andrea

      Comment

      Working...
      X