I am really excited to announce the launch of my new program asdoc that sends Stata output to MS Word or RTF format. asdoc creates high-quality, publication-ready tables from various Stata commands such as summarize, correlate, pwcorr, tab1, tab2, tabulate1, tabulate2, tabstat, ttest, regress, table, amean, proportions, means, and many more. Using asdoc is pretty easy. We need to just add asdoc as a prefix to Stata commands [See this short blog entry for quick start]. asdoc has several built-in routines for dedicated calculations and making nicely formatted tables.

The program can be installed from SSC by typing the following in Stata command window:

Once installed, you can read the help file with

The help file is very generous in providing examples and discussions. It has 79 examples.

Though the help file and my website page provide sufficient details on different aspects of the program, let me highlight the key features of the program below:

asdoc has dedicated routines for producing nicely formatted tables of most frequently used statistics such as summary statistics, correlations, regressions, frequency tables, and t-tests. Users can easily specify the number of decimal points, font size, table titles, column titles, and other aspects of these statistics.

asdoc can create two types of regression tables. The first type (call it detailed) is the detailed table that combines key statistics from the Stata's regression output with some additional statistics such as mean and standard deviation of the dependent variable etc. This table is the default option in asdoc. The second table is a compact table that nests more than one regressions in one table (call it nested). There also a YouTube video that shows how to create nested regression tables with asdoc. Both types of tables are publication-quality and can be directly used in research papers and theses, etc.

The primary challenge in reporting results of the ttest command is what statistics to report and in which format to report. The format should be such that it occupies minimum space possible. Over many other possibilities, I preferred the format of a single line for all types of t-tests. Therefore, whether it is one-sample t-test or two-sample or other forms, asdocmanages to report the results line by line for each test. asdoc also allows accumulating results from different runs of t-tests. For this purpose, the option

Exporting tables from table command was the most challenging part of

Stata's list command displays the values of variables.

To report one value per group or unique values of varlist, we can use the

Stata commands that have some output in the result window can also be used with

Professor River provided helpful suggestions on improving the display format of the correlation tables.

Since this is the first version, programming bugs are likely to exist. I shall really appreciate comments and suggestions for improving asdoc. You can reach me at

**Installation**The program can be installed from SSC by typing the following in Stata command window:

Code:

ssc install asdoc, replace

Code:

help asdoc

**Key Features**Though the help file and my website page provide sufficient details on different aspects of the program, let me highlight the key features of the program below:

**1. Nicely formatted tables for frequently used statistics**asdoc has dedicated routines for producing nicely formatted tables of most frequently used statistics such as summary statistics, correlations, regressions, frequency tables, and t-tests. Users can easily specify the number of decimal points, font size, table titles, column titles, and other aspects of these statistics.

**2. Full and nested regression tables**asdoc can create two types of regression tables. The first type (call it detailed) is the detailed table that combines key statistics from the Stata's regression output with some additional statistics such as mean and standard deviation of the dependent variable etc. This table is the default option in asdoc. The second table is a compact table that nests more than one regressions in one table (call it nested). There also a YouTube video that shows how to create nested regression tables with asdoc. Both types of tables are publication-quality and can be directly used in research papers and theses, etc.

**3. Writing all statistics to one document****asdoc**provides the convenience of writing all statistics to a single document with its option**append**. Even it allows the construction of tables in pieces with its option**rowappend**. Further, it allows adding text or paragraphs with an option**text.**This is useful when we want to add details or comments with the Stata output.**4. Formatted tables of t-tests**The primary challenge in reporting results of the ttest command is what statistics to report and in which format to report. The format should be such that it occupies minimum space possible. Over many other possibilities, I preferred the format of a single line for all types of t-tests. Therefore, whether it is one-sample t-test or two-sample or other forms, asdocmanages to report the results line by line for each test. asdoc also allows accumulating results from different runs of t-tests. For this purpose, the option

**rowappend**of asdocreally comes handy.**5. Frequency tables****asdoc**has several built-in routines for reporting properly formatted frequency tables. As with other commands, we need to just add asdoc as a prefix to the tabulation commands that includes tabulate, tabulate1 tabulate2, tab1, and tab2, etc.**6. Compact tables****asdoc**makes some elegant tables when used with tabstat command. There are several custom-made routines in asdoc that create clean tables from tabstat command. asdoc fully supports the command structure and options of tabstat. And, yes asdoc allows one additional statistics, that is, t-statistics alongside the allowed statistics in tabstat. For reporting purposes, asdoc categorizes tabstat commands in two groups: (1) stats without a grouping variable (2) stats over a grouping variable.**7. Flexible tables**Exporting tables from table command was the most challenging part of

**asdoc**programming. Nevertheless, asdoc does a pretty good job in exporting table from table command. Therefore, asdoccan export one-way, two-way, three-way, and four-way tables.**8. Exporting dataset**Stata's list command displays the values of variables.

**asdoc**can export these values to a file in form of a nicely formatted table. asdoc implements the most basic version of list command and might not accept some of its options such as mean, sum, etc. However, the [if] [in] qualifiers are accepted.**9. Exporting Stata matrix****asdoc**can export a Stata's matrix to a file in form of a nicely formatted table.**10. List of unique values**To report one value per group or unique values of varlist, we can use the

**aslist**command of**asdoc****11. Export variable names and labels to a table****asdoc**can be used with the Stata describe command to make a table of variable names, labels, etc.**12. Other Stata commands**Stata commands that have some output in the result window can also be used with

**asdoc**. Even when a command does not have an output and asdoc is unintentionally added as a prefix, asdoc will just pass the command to Stata without generating any output. asdoc might come up with a less than pretty output if it is used with a Stata command that does not have a standard table format. If a user-written command that estimates regression model is used with asdoc, option**isreg**can be used to tell asdoc that the command is a regression command.**Acknowledgment**Professor River provided helpful suggestions on improving the display format of the correlation tables.

Since this is the first version, programming bugs are likely to exist. I shall really appreciate comments and suggestions for improving asdoc. You can reach me at

**[email protected]**

Support website: www.FinTechProfessor.comSupport website: www.FinTechProfessor.com

## Comment