.- help for ^tabsort^ .- One- and two-way tables with sorted rows and/or columns ------------------------------------------------------- ^tabsort^ varlist [weight] [^if^ exp] [^in^ range] [, ^nors^ort ^nocs^ort ^rev^erse ^so^rt^(^measure^) s^ummarize^(^summvar^)^ tabulate_options ] Description ----------- ^tabsort^ tabulates varlist, containing either one or two variables, such that the order of rows (and of columns where present) is by default by frequency of occurrence (most frequent first), or optionally by means or standard deviations of a summarized variable (highest value first). Remarks ------- 1. The row and column labels are necessarily no more than 8 characters long, as a result of using value labels. 2. String variables that contain only one or more spaces " " are tabulated with marginal ^|^, subject to 1. 3. String values that are empty "" are tabulated as ^missing^. Options ------- ^norsort^ suppresses sorting of rows by frequency. ^nocsort^ suppresses sorting of columns by frequency. ^reverse^ reverses the sort order, so that lowest values come first. ^sort(^measure^)^ indicates the measure by which rows and/or columns are sorted. The default is ^f^ or ^freq^, indicating frequencies. ^c^ or ^count^ is acceptable as a synonym. Alternatively, with ^summarize( )^ ^m^ (or ^mean^) or ^s^ (or ^sd^) may be specified. ^summarize(^summvar^)^ indicates a variable to be summarized within each cell of the table. tabulate_options are other options for ^tabulate^. Examples -------- . ^gen str1 Make = ""^ . ^replace Make = substr(make,1,index(make," ")-1)^ . ^replace Make = make if Make == ""^ . ^tabsort Make^ . ^tabsort Make foreign^ . ^tabsort rep78 foreign, su(price) so(mean)^ Author ------ Nicholas J. Cox, University of Durham, U.K. n.j.cox@@durham.ac.uk Also see -------- On-line: help for @tabulate@, @tabsum@