Announcement

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

  • Tabulation using asdoc: formatting issues with decimals

    Hi everyone,

    I'm using asdoc in Stata for tabulation, and I’ve encountered a couple of formatting issues. I'd appreciate any advice:
    1. Decimal formatting: Stata reports values like .233, but I would like it to show a leading zero, i.e., 0.233.
    2. Decimal precision: I restricted the output to three decimal places using the dec(3) option. However, in some cases, it reports values like .06 instead of .060. I want the output to always show three digits after the decimal point.
    If anyone knows how to fix these formatting issues with asdoc, I’d be very grateful for your help!

    Thanks in advance.

  • #2
    You may need to ping the author Attaullah Shah who is responsive to specific questions about his commands but otherwise not active here routinely.

    (asdoc is from SSC, as you're asked to explain.)

    Comment


    • #3
      Add option tzok. From the asdoc help file, see.
      1.14 Always report equal decimal points (tzok)
      The default behavior for reporting decimal points is to omit trailing zeros and display only significant decimal digits. However, we can use the tzok (i.e., "trailing zeros OK") option to ensure that all values are reported with the same number of decimal places, even if the trailing digits are zeros. For example, when using the dec(4) option to report four decimal places, the value 2.1 will be displayed as follows, with and without the tzok option:

      Code:
            Default style 2.1
              with tzok option 2.1000
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment


      • #4
        Thanks a lot professor Attaullah and professor Nick

        Comment

        Working...
        X