Dr. Attaullah Shah
Keymaster
Post count: 106

Ha Thai Son
tabsort is not a Stata official command, therefore, asdocx does not know about it. This program was written by Nick Cox and one has to install it. If you want to use asdocx with tabsort, here is the modified version of tabsort that uses asdocx inside its main body. If you run this modified tabsort, it will generate the asdocx output. To run it, you need to first copy and paste it in the C:/ado/plus/t folder or other Stata folders where Stata can find it. [Download the modified tabsort here]

* Load auto data
sysuse auto, clear
tabsort rep78
-------------------------------------------------------
  1 |Repair Record 1978     Freq.     Percent        Cum. 
----+--------------------------------------------------
  2 |              3        30       43.48       43.48 
  3 |              4        18       26.09       69.57 
  4 |              5        11       15.94       85.51 
  5 |              2         8       11.59       97.10 
  6 |              1         2        2.90      100.00 
  7 |          Total        69      100.00             
-------------------------------------------------------
  

* With two variables
 tabsort foreign rep78
---------------------------------------------------------------------
  1 |       Car type6 Repair Record 1978                                     
----+----------------------------------------------------------------
  2 |              1           3     4     5     2     1    Total 
  3 |       Domestic          27     9     2     8     2          48 
  4 |        Foreign           3     9     9     0     0          21 
  5 |          Total          30    18    11     8     2          69 
---------------------------------------------------------------------

Since this is a very basic version of asdocx implementation, please do not expect much from it in terms of other asdocx options.