
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
Dear 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!
Dropbox creates a file sharing violation. You need to set the current directory outside Dropbox.
Dear 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?
stars 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/
Hi my ouput is some sort of html-code instead of the normal doc-format.
Any help?
What command did you use, please post it here
Dear professor,
I am really happy about your package -the first one through which you do not lose hours by formatting.
Right now I am running mixed models and I’m struggling with the Random-effects parameters: I would like to report var(_cons) and var(Residual) in my table.
However asdoc only reports lns1_1_1:_cons and lnsig_e:_cons. Is there a way to transform lns1_1_1:_cons and lnsig_e:_cons to get var(_cons) and var(Residual) in my output table? For example with a transformation option for the asdoc package?
Heres my code example:
mixed mood i.weekday || id:
asdoc replay, replace nest
Kind regards!
Support for mixed models is not present in asdoc. It is added to asdocx, see details related to asdocx here https://fintechprofessor.com/asdocx/
Prof. Shah:
I´m trying to use asdoc with the command menbreg (for multi-level non-binomial regression), but it does not work. It always gives me an error message.
The command I use is like this:
asdoc menbreg doctor age female i.isced1997_r ph006d16##c.bfi10_neuro|| country: bfi10_neuro, irr
After this, I receive always a message that says: “interactions not allowed”
Could you give any support for this?. Thank you in advance.
Best regards,
Manuel
asdoc does not work with multi-level models. However, there is a way to do it in asdocx, see details related to asdocx here https://fintechprofessor.com/asdocx/
Thanks, Prof. Shah
Hi. Is it possible to include plots in the word document using the asdoc command?
This is possible in asdocx, see https://fintechprofessor.com/asdocx/options-for-docx-word-files-asdocx/export-graphs-and-charts-from-stata-to-word-with-asdocx/