How to export high-quality table of correlations from Stata to MS Word

  • 4

How to export high-quality table of correlations from Stata to MS Word

Category:asdoc Tags : 


For creating a high-quality publication-ready table of correlations from Stata output, we need to install asdoc program from SSC first.

ssc install asdoc, update

Once the installation is complete, we shall add the word asdoc to the cor or correlate command of Stata. Since we estimate correlations among all numeric variables of a dataset with just cor, we shall add asdoc as a prefix to the cor command. For our example, purposes, let us load the auto.dta data from the Stata example files.


Example 1: Make a table of correlation for all variables.

sysuse auto, clear
asdoc cor



Example 2: We can report variable labels instead of variable names

asdoc cor, label replace



Further, it is possible to write names of the variables in the column headings instead of sequential numbers. For this, we shall invoke the option nonum. Therefore, see example 3.


Example 3: Write variable names in column headers

sysuse auto, clear

asdoc pwcorr, nonum replace


Read also : 

Table of contents of asdoc

Generate correlation table with significance/stars

Generate a table of descriptive statistics






Leave a Reply


Zhang Huang

November 12, 2018at 2:48 pm

I can’t download asdoc from the stata. Can you help me and sent the asdoc.ado and asdoc.sthlp to me?
Thank you.

    Attaullah Shah

    November 12, 2018at 2:50 pm

    To download, type
    ssc install asdoc

    If you receive any error message, then please share that.

Zhang Huang

November 12, 2018at 2:53 pm

Sorry. It always replies like this in Stata:

ssc install asdoc, replace

checking asdoc consistency and verifying not already installed…
connection timed out -- see help r(2) for troubleshooting
could not copy
(no action taken)

I think maybe because I am in China, so the download action is defined.

Attaullah Shah

November 12, 2018at 2:55 pm

OK, copy the attached files to the mentioned directories

copy asdoc.ado and asdoc.sthlp to this folder


2. Copy the lasdoc.mlib to this folder


The last letter is L in small.

Leave a Reply

three + 18 =