Announcement

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

  • Indicating non-existent control variables in esttab

    Dear Statalist,

    I vaguely remember that there is a way to produce esttab tables, indicating whether controls which are not part of any stored results exist or not. Unfortunately, I do not recall the exact way and I cannot seem to find the solution.

    Please see the example provided below which results in the error message "coefficient *.foreign not found". I know that this is exactly what is happening, but due to reasons of convenience I would like the command to produce a table which indicates that there is indeed no control variable "foreign" in the stored regressions.

    Thank you very much for your help, I really appreciate it.

    Best wishes,
    Stefan Sliwa

    Code:
    * Load data
    sysuse auto.dta, clear
    
    * Run the regression (stored automatically)
    reg price weight length
    
    * Display stored regression results
    esttab, se keep(weight) indicate("Foreign = *.foreign")

  • #2
    estout is from SSC (FAQ Advice #12). The rationale for -indicate- is that some models have the indicated coefficient(s) and some don't. If they all do not, there is nothing to indicate and you can just add a note that all models do not include whatever is to be indicated. Alternatively, use -estadd local-, but if all columns have the words "No", they are not informative.
    Last edited by Andrew Musau; 15 Mar 2022, 03:54.

    Comment

    Working...
    X