Announcement

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

  • Table 1 issue

    Hi Statalist

    I am trying to make a classic table 1. When I run the code in functions very well but I would like that the percentage of the total amount of the study population to be in a parenthesis after the number - i.e number living in LA: 1500 (15%).
    Is this do-able in stata?

    Code:
    table () (exposure sex), ///
     statistic(mean age) ///
     statistic(sd age) ///
     statistic(fvfrequency reg ) ///
     statistic(fvpercent reg) ///
     nformat(%9.0fc frequency) ///
     nformat(%6.2f  mean sd) ///
     style(table-reg1-fv1) ///
     nototal


  • #2
    you need the sformat("(%s)") option; see
    Code:
    h table
    of see part 3 of Chuck Huber's 7-part intro to table at blog.stata.com; part 3 is entitled "Customizable tables in Stata 17, part 3: The classic table 1" and can be found at:
    https://blog.stata.com/2021/06/24/cu...assic-table-1/

    Comment

    Working...
    X