Announcement

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

  • decimal in outreg2

    Dear All, I have the code
    Code:
    sysuse auto, clear
    global all "price mpg rep78 headroom trunk"
    sum $all
    outreg2 using "auto_sum", sum(detail) replace label word dec(3) sortvar($all) keep($all) eqkeep(N mean sd p5 p25 p50 p75 p95)
    where -outreg2- has to be installed first by -ssc install outreg2-.

    The result is:
    Click image for larger version

Name:	auto_sum.png
Views:	1
Size:	15.0 KB
ID:	1433121


    My question is: how can I change the decimal of the first (1) N column to 0, e.g., 74, 74, 69, 74, and 74.
    Ho-Chuan (River) Huang
    Stata 19.0, MP(4)

  • #2
    The documentation mentions

    bdec(#) or bfmt(type) for coefficient only
    sdec(#) or sfmt(type) for standard error
    tdec(#) or tfmt(type) for t-statistics
    pdec(#) or pfmt(type) for p-value
    cdec(#) or cfmt(type) for conf. interval
    rdec(#) or rfmt(type) for r-square
    adec(#) or afmt(type) for addstat( ) contents

    Whether these work for you problem, I 'm not sure.

    Comment


    • #3
      Dear Phil, As you can see, I used -dec(3)- option, but it applied to all statistics, including `N'. That's the problem. Thanks anyway.

      Ho-Chuan (River) Huang
      Stata 19.0, MP(4)

      Comment

      Working...
      X