Home Forums ASDOC : Easy Publication Quality Tables in Stata can we use sort option in in tabulate command with asdoc

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Sapai
    Guest
    Post count: 118

    suppose I want to tabulate a string variable and want to sort it by its frequency

    Attaullah Shah
    Keymaster
    Post count: 69

    Right now, asdoc can tabulate and export string variables. See this example.

    sysuse nlsw88, clear
    decode industry, gen(ind2)
    asdoc tab ind2, replace
    
    
                   industry |      Freq.     Percent        Cum.
    ------------------------+-----------------------------------
      Professional Services |        824       36.92       36.92
              Manufacturing |        367       16.44       53.36
     Wholesale/Retail Trade |        333       14.92       68.28
    Finance/Ins/Real Estate |        192        8.60       76.88
      Public Administration |        176        7.89       84.77
          Personal Services |         97        4.35       89.11
     Transport/Comm/Utility |         90        4.03       93.15
        Business/Repair Svc |         86        3.85       97.00
               Construction |         29        1.30       98.30
      Ag/Forestry/Fisheries |         17        0.76       99.06
      Entertainment/Rec Svc |         17        0.76       99.82
                     Mining |          4        0.18      100.00
    ------------------------+-----------------------------------
                      Total |      2,232      100.00

    However, the sort option is not yet available. I shall add it to asdocx, which is almost ready. See details on asdocx here

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.