Announcement

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

  • Change format of reported coefficients for different columns using esttab/estout

    Hi,

    I am using esttab from the Stata Journal. I am outputting a regression table - this is the issue I face:

    I want to output coefficients and standard errors with three decimal places (so I don't want to specify a3, which increases the number of decimal places for numbers less than 1). However, if three decimal places gives me 0.000, I want more precision and want to move to four decimal places (just for that particular number). I am creating many tables, and there is only one number like this, so I don't mind if it is somewhat hard-coded.

    Now, I know that I can specify different formats for different rows - however, is there a similar way to have a different format for different columns (or models, in esttab's language)?

  • #2
    Originally posted by Akash Bhatt View Post
    Now, I know that I can specify different formats for different rows - however, is there a similar way to have a different format for different columns (or models, in esttab's language)?
    There is no option for that.

    so I don't want to specify a3, which increases the number of decimal places for numbers less than 1
    How many decimal places do you need for such numbers? This format tells Stata to print 3 decimal places if the absolute value of the number is larger than or equal to 0.0005, otherwise print up to 1 significant figure (rounded if necessary).
    Last edited by Andrew Musau; 24 Jul 2024, 06:33.

    Comment


    • #3
      Thanks for getting back Andrew -my understanding is that a3 makes any number less than 1 have 3 "significant" decimal places, which means that it won't count the leading zeroes. What that does is makes some numbers seem with 3 decimal places (like 1.278) and some numbers seems like 6 decimal places like 0.000216. I would want it to keep the former, but change the latter to 0.0002 - thus, the rule I ideally want is: 3 decimal places, and add one if all 3 are zero. a3 instead seems to have the rule - 3 decimal places if number >1, and as many decimal places it takes to get three non-zero numbers for numbers less than 1 (talking about absolute values here)

      Comment


      • #4
        If you have very small coefficients displayed as, e.g., 0.000016, it indicates that you should rescale the variable. If it's the coefficient of weight in grams, use kilograms (divide by 1000). If it is a dollar value, use thousands of dollars or millions of dollars (divide by 1000 or 1 million, respectively).

        Code:
        replace weight= weight/1000
        label variable weight "Weight in kilograms"
        This way, the issue won't arise, and it will be easier for your readers to follow the reported results.

        Comment

        Working...
        X