Export Regression tables from Stata to Word or Excel

To export regression tables from Stata to Word, Excel, LaTeX, or HTML format, just add asdocx to the beginning of the Stata command, and your regression table is ready in your desired format. asdocx can create three types of regression tables: (1) Detailed table (2) Nested table and (3) Wide tables. The detailed table 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 asdocx.


asdocx reg depvar indepvar [if] [in] [weights], [stata_options 
       replace dec() tzok title() save() label
       nostars noci notes() setstars() ]

Following is a list of asdocx options that are available with the detailed regressions:

Option Purpose
title(table title)  to specify the regression table title
dec(#) to specify the decimal points for regression coefficients; default is 3 dp.
setstars to set custom significance level for start. Default is setstars(***@.01, **@.05, *@.1)
nostars to suppress significance stars
eform to report exponentiated coefficients
label to report variable labels instead of names
noci do not report confidence internals
notes() write table notes, appended to the end of the table
tzok report equal number of zeros, even if trailing values are zeros
save() set the file name and extension
abb(.) do not abbreviate variable labels or names
auto-adjust the columns to contents

When to use detailed regression tables

Detailed regression tables offer a large set of statistics and occupy a larger space. Therefore, they are best suited for situations where space constraints are not a concern, such as in the academic thesis writing. These asdocx detailed tables provide a several options that allow you to customize the information presented.

You can selectively choose which columns to include or exclude based on your reporting needs. For instance, you can use the noci option to omit the two columns containing confidence intervals. Here is an illustrative example:

*Load example data

sysuse auto, clear

* wide regression, suppressing the confidence interval

asdocx reg price mpg trunk i.rep78 headroom weight foreign, replace  noci

Export from Stata to Excel Word regression results asdocx min

In the code snippet and resulting table shown above, pay attention to the variable rep78. This particular variable is categorical in nature. To capture the coefficients for each category within this variable, the i. prefix was added. This specific prefix choice instructs asdocx to include each category as a separate entry in the regression table. In this instance, it resulted in the reporting of all five categories within the rep78 variable in the regression table.

Report variable labels

To report the variable labels instead of variable names in the regression table, use the option label. The auto dataset that we used previously has variable labels and hence they can be reported in the regression table. See the following example where I add the option label. You can see the effect of this option in the following table, column 1.

*Load example data

sysuse auto, clear

* wide regression, suppressing the confidence interval

asdocx reg price mpg trunk i.rep78 headroom weight foreign, replace  noci label

Export variable labels Stata regressions to Excel Word with asdocx