Announcement

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

  • DTABLE table formatting

    Hi, I am trying to use the dtable command and add formatting for my continuous variables. The results come out with median and IQR next to each other. Is there a way to have the IQR in paranthesis like this? 3.98 (1.76).

    ----------------------- copy starting from the next line -----------------------
    Code:
    dtable i.gender i.cancer i.diabetes i.smoke i.osteoarthritis , by(group, tests) continuous(vita vitb vitc vitd vite magnesium, statistics(median iqr) test(kwallis)) nformat(%3.2f median iqr) export(table1.docx)
    end
    ------------------ copy up to and including the previous line ------------------

  • #2
    Add the -sformat()- option to your command, specifically, -sformat("(%s)" iqr)-.

    Comment


    • #3
      Thank you Clyde, this works perfectly!

      Comment

      Working...
      X