Announcement

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

  • Help tab display rounded / truncated values after applying weights

    Hello,
    Is it a way to have as an output rounded or truncated values for frequencies in a tab command with weight applied (aw)? ie I want to have just 662 displayed instead of 662.25721.
    Thanks in advance!
    Cris (Stata15)

  • #2
    the following is from the help file for -tabdisp-:
    format(%fmt) specifies the display format for presenting numbers in the
    table's cells. format(%9.0g) is the default; format(%9.2f) is a
    popular alternative. The width of the format you specify does not
    matter, except that %fmt must be valid. The width of the cells is
    chosen by tabdisp to be what it thinks looks best. The cellwidth()
    option allows you to override tabdisp's choice.
    so, you might want to try something like
    Code:
    format(%9.0f)
    as an option to your command

    Comment


    • #3
      Thank you, Rich, for the suggestion!
      'tabdisp' requires in my case some constructor. I used 2-way tabulate - sorry for not saying that - and 'format' doesn't (appear) to work with this one.

      'svy: tab x y, format' works, but the result are percentages only. Format works as well with 'table' - but for some reason aweight has no effect, while pweight do (?!).

      I'm new with this, I'll keep looking, thank you!
      Cheers!

      Comment

      Working...
      X