Announcement

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

  • Numerical format in regression tables using esttab/estout

    Dear Statalist,

    I am using esttab (wrapper for estout) from SSC in Stata 16.1.

    I am trying to export regression tables in which there are various models (columns) with different dependent variables (but the same independent variables). Is it possible to set different numerical display formats for the point estimate of the same coefficient in the various models?

    Here is a simple example that illustrates my question: Assume that I try to assess if the car type (domestic/foreign) affects the price and the repair record of a car:

    Code:
    sysuse auto, clear
    qui eststo: reg price foreign
    qui eststo: reg rep78 foreign
     
    esttab, b(%9.3f) se(%9.3f) nocons title("(1) basic output using esttab")          
    eststo clear
    I uploaded the output (1) as well as the desired output (2) as attachment.

    I am aware that you can set different numerical display formats for different point estimates (b(fmt)). Is it also possible to change the display format for the same variable but another model? As in my example: three decimal places in model (1) and only one decimal place in model (2).

    Or are there any other user-written commands (e.g., outreg) that may solve this problem?

    Thanks for any advice!
    Patrick


    Click image for larger version

Name:	example.png
Views:	1
Size:	21.3 KB
ID:	1587926

  • #2
    I don't believe this is possible within the limitations of the package itself. I realize this doesn't replicate your desired output, but do estout's special "automatic" formats work for your use case? For example,
    Code:
    esttab, b(a1) se(a1)

    Comment


    • #3
      Originally posted by Nils Enevoldsen View Post
      I don't believe this is possible within the limitations of the package itself. I realize this doesn't replicate your desired output, but do estout's special "automatic" formats work for your use case? For example,
      Code:
      esttab, b(a1) se(a1)
      Thanks for your advice. I have tried the automatic format, but, unfortunately, it does not work in my case.

      Comment


      • #4
        Hi everyone,

        I have the exact same question as Patrick, so I am just wondering if anyone might be able to answer (or if you, Patrick, found a suitable alternative in the meantime).

        Thank you,
        Sergio

        Comment

        Working...
        X