### About asdoc

asdoc is a Stata program that makes it super-easy to send output from Stata to MS Word. asdoc creates high quality, publication-ready tables from various Stata commands such as summarize, correlate, tabstat, cross-tabs, regressions, t-tests, flexible table, and many more.

### Installation

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

ssc install asdoc, update

### Table of contents

### 1. Introduction

1.1 asdoc: short introduction and examples

1.2 Commands for controlling asdoc

### 2. Summary Statistics

2. Summary statistics

2.1 Basic summary statistics

2.2 Customized summary statistics

### 3. Correlations

3.1 Correlations [Blog Post]

3.2 Correlations [YouTube Video]

3.3 Correlations with significance stars

### 4. Regressions

4.1 Full regression tables [YouTube Video]

4.1.1 Customizing the detailed table: Stars and CIS

4.2 Compact / nested tables (publication quality)

4.3 Regression over a grouping variable (YouTube Video)

4.4 Changing order of variables in the nested regression table

### 5. Frequency tables

5.1 One-way tabulation (tabulate1) Watch YouTube Video

5.2 Two-way tabulation (tabulate2) Watch YouTube Video

5.3 One- and two-way tables of summary statistics (tabsum)

5.4 Multiple-way tables (tab1)

5.5 All-possible two-way tables (tab2)

### 6. Compact tables (tabstat)

6.1 Without groups

6.2 With groups

### 7. Flexible table of statistics (table)

7.1 One-way table

7.2 Two-way table

7.3 Three-way table

7.4 Four-way table

### 8. T-tests

8.1 one-sample t-test

8.2 two-sample using groups

8.3 two-sample using variables

8.4 paired t-test

### 9. Table of means, std., and frequencies (tabsum)

10. Means

10.1 Arithmetic / harmonic / geometric means

10.2 Proportions

10.3 Ratio

10.4 Total

11. Exporting the Stata Data with the sub-command list

12. Writing matrix to a Word / RTF file

13.The survey prefix command

14.Customized tables with option row

15.Customizing Table Titles – Tips and Tricks

BrianJuly 18, 2021 at 10:47 amDear Professor, when I tried to export my tables using asdocx, there is an error message:

_asdoc/Tables.flexmat already exists

fopen(): 602 file already exists

write_fmtmat(): – function returned error

: – function returned error

My code is as follows:

asdocx sum `var_list’, stat(N mean sd p25 p50 p75) dec(3) tzok label ///

save(Tables.docx) ///

title(Summary Statistics)

My data and code are stored in dropbox. How can I fix the probelm? Thanks!

giuseppe simoneOctober 14, 2021 at 9:32 pmDear professors,

I used your very brilliant program to create tables. However, it seems doesn’t work perfectly on my Stata.

It doesn’t put the stars on the correlation table.

Moreover, it doesn’t restrict the number of variables chosen when I performed the des. command.

Can u help my with some advice to solve these issues?

Attaullah ShahNovember 6, 2021 at 10:05 amstars are possible only in the pwcorr command, not in the cor command. I shall add the variable restriction in asdocx, see details here https://fintechprofessor.com/asdocx/