asdocx Update History

This page presents the log of asdocx updates. The most recent updates are shown at the top of the page.

* Sep 30, 2021: Version 1.8.6: xttab command added |
* Sep 18, 2021: Version 1.8.5: Improved dispaly for mean and svy: command |
* Sep 14, 2021: Version 1.8.4: Issue with wmat command fixed (labels containing comma)|
* Sep 14, 2021: Version 1.8.3 : tabmany now accepts [if] and [in]
* Sep 13, 2021: Version 1.8.2 : Bug fix when if was used with by() in tabstat
* Augu 24, 2021: Version 1.8.1 : error asdocx_delete_close() fixed

Aug 05, 2021: Version 1.8.0 :

This version adds options to control the style and size of cell borders of theĀ  first, second, and last rows of tables. These improvements are added to the file. The do file now has the following code lines

/* Sets top border for row 1 and row 2 of the table; arguments are 
separated by space. This line is reset at each run to 1 2
Top and bottom border are available in docx with Stata version 
14.2 and above. 
The following two lines will be set if do_border is set to 1 */

global hlines "1 2"

// underline styles

/* possible values are:
single, dashDotStroked, dashed, dashSmallGap, dotDash,
dotDotDash, dotted, double, doubleWave, inset, nil, none, outset, 
thick, thickThinLargeGap, thickThinMediumGap, thickThinSmallGap, 
thinThickLargeGap,thinThickMediumGap, thinThickSmallGap,
thinThickThinLargeGap,thinThickThinMediumGap, thinThickThinSmallGap,
 threeDEmboss, threeDEngrave, triple, and wave.

// The top row of the table has single underline 
// whereas the second row has double underlines.
global hlines_style "single double" 

// The last line of the table - underline style
global hrend_style "single"

// The last line of the table - underline width : 
// 4 means normal : 8 is double in width: 
//can be set up to 75
global hrend_width 8

To know more about the file, see this link

Aug 04, 2021: Version 1.7.9 : addition of graphs

Support for the following graphs is added.

(1) heatplot (from SSC),

(2) reldis graph (from SSC)

(3) marginsplot

(4) hexplot (from SSC)

Aug 03, 2021: Version 1.7.8 :

(1) title() accepts parentheses, brackets, and square brackets. For example

asdocx sum, title(Table - Summary (testing title update))

asdocx sum, title(Table - Summary [testing title update])

asdocx sum, title(Table - Summary {testing title update})

(2) tzok works with tabulate


asdocx tabulate rep78 foreign, tzok replace

Aug 03, 2021: Version 1.7.6 : Various updates :

(1) reghdfe, that is available on the SSC, has been added to nested regression

(2) Update to tabulate, sort

The sort of tabulate command now works on both string and numbers. See examples here

July 29, 2021: Version 1.7.5 : asdocx clear

asdoc keeps a copy of the stored matrices, results, text, and graphs in the hidden folder _asdoc. These files are used when users try to append new results to existing files. Therefore, these files are required by asdocx, until the user decides that s/he will never need to append to the same file. However, if the user decides to delete these files, asdocx then offer a decent way to do it, See more details here


July 28, 2021: Version 1.7.4 : table_layout(auto)

table_layout() has now three options, with the addition of table_layout(auto), which autofits contents to the window. See more details here

asdocx sum , detail replace table_layout(auto) fs(10)


July 27, 2021: Version 1.7.3 : addition of xtsum command

asdocx can now export output from xtsum command. See the following example.

webuse abdata.dta, clear
asdocx xtsum emp k wage cap , replace


July 27, 2021: Version 1.7.0 to 1.7.2 :Fixing various bugs

There were small fixes to various bugs in version 1.7.0, 1.7.1 and 1.7.2. Specifically, nested regression would throw an error when used with poisson command. That has been fixed now. The list would show an error if a string variable has double quotes. That has been fixed in version 1.7.1. This version also fixed an issue with the rowappend option. More details on this can be found here. And finally, version 1.7.2 fixes an issue with the unpaired two-sample t-test.


July 2, 2021: Version 1.6.9 : bys and by() now works with nested regress

nested regressions can be now be estimated and reported using a grouping variable either in the bysort prefix or by(varname).

* Use grunfeld dataset
webuse grunfeld

* Just keep 5 companies in the dataset and then estimate regression for each company
keep if company < 6

* Note the bys company
bys company : asdocx reg invest mvalue kstock, nest replace


July 2, 2021: Version 1.6.8 : bysort and by() work with tabulate command

One-way tabulation can now be done using a grouping variable. bysort and by() are alternative here. So the following two commands are similar.

sysuse auto, clear
bys foreign : asdocx tab rep78, replace
* OR
asdocx tab rep78, replace by(foreign)


June 26, 2021: Version 1.6.7 : Use the control word \cr :

in table title. \cr adds a carriage return to the title. The title then appears on multiple lines. For example;

asdocx sum, title(First Title \cr Second Title \cr Third Title) replace

The table title will appear on three lines.


June 19, 2021: Version 1.6.6 : Notes added to nested regression:

Nested regression now automatically reports notes in the table footer. The default notes show either standard errors, robust standard errors, t-values or p-values, as the case maybe. User’s notes can also be appended to these notes. Example is given below:

sysuse auto, clear
asdocx reg price mpg trunk, notes(This example uses auto.dta set) replace


June 18, 2021: Version 1.6.5 : tableonly option for LaTeX

If exporting to a LaTeX format, users can now use option tableonly. This option can be used to append various tables in a single document. See the request of the forum member and his example on how to use this option here


June 15, 2021: Version 1.6.4 : Graph Height and Width:

When exporting graph to a Word documents, users can now use options width() and height() to control the width and height of the graph. For a high resolution graph, the width and height values can be set as high as desired.

sysuse auto, clear
asdocx scatter rep78 price, width(2000) height(3000)


June 15, 2021: Version 1.6.3 : Weights added to graphs

The syntax for graph command now accepts weights. Therefore graphs can be added to asdocx documents with all relevant options of a given graph. Examaple

asdocx scatter drate medage [w=pop18p]

* June 15, 2021: Version 1.6.2 : support for community contributed program xtdpdgmm added

* June 4, 2021: Version 1.6.1 : ‘asdocx collect on’ added to suppress output with each run of asdocx. Can be helpful in loops.

* June 2, 2021: Version 1.6.0 : pagebreaks added: option pagebreak(before) and pagebreak(after) can be used now:

* : Support for floatplot (SSC) added – possible with the generous financial contribution by Prof. Eric Melse.

* May 29, 2021: Version 1.5.9 : option format(%fmt_options) and dec() now works with two-way tabulations

* May 1, 2021: Version 1.5.8 : Improvements made to template files.

* April 13, 2021: Version 1.5.7 : Support for interaction terms and factor variables added for anova

* April 2, 2021: Version 1.5.6: Flexmat can now be used independently. From asdocx, it needs to be run with option mode(asdocx)

* March 20, 2021: Version 1.5.5: flexmat and exportflex updated to work inside asdocx

* March 17, 2021: Version 1.5.4: Minor fixes for by() ttest; mixed command

* March 14, 2021: Version 1.5.3: New system for notes, title, and each table formats

* March 1, 2021: Version 1.5.2: 1) Option sort added to tabulate 2) Suport for option text() added

* Feb 17, 2021: Version 1.5.1: Option format can be used to use custom format: format(%16.3f) or format(%20.0g)

* Feb 16, 2021: Version 1.5.0: Minor fixes

* Feb 09, 2021: Version 1.4.9: File / folder address now space / special characters-proof

* Feb 04, 2021: Version 1.4.8: Improvements to the codebook speed and table1 template

* Feb 01, 2021: Version 1.4.7: Support added for the community contributed -groups- command

* Jan 26, 2021: Version 1.4.6: Nested regressions can be now combined with other contents in the same file

* Jan 25, 2021: Version 1.4.5: asdocx_defaults updated. font and fs now correctly work for current session and as permanent options

* Jan 22, 2021: Version 1.4.4: To format t-values, p-values or se in nested regressions, we can now use dect() option. Also, fixed issue with fs() option.

* Jan 18, 2021: Version 1.4.3: asdocx now can export compact codebook

* Jan 16, 2021: Version 1.4.2: asdocx now supports graph, scatter, line, twoway to export graphs to docx files

* Jan 15, 2021: Version 1.4.1: nested regressions now supports upto 50 regressions.

* Jan 05, 2021: Version 1.4.0: cnames() now work correctly with the nested regresion tables

* Dec 16, 2020: Version 1.3.9: transpose option can now be used to transpose any table

* Dec 16, 2020: Version 1.3.8: Bug fixed in value labels of factor variables in detailed regression

* Dec 15, 2020: Version 1.3.7: tabmany now added to report tabulation of many variables in one table

* Dec 02, 2020: Version 1.3.6: Values labels are reported now with list command

* Nov 20, 2020: Version 1.3.1: Leading zero are reported now.

* Nov 09, 2020: Version 1.3:0: Tabulation Command updated

* Nov 08, 2020: Version 1.2.0: Support for setting options n the current session added

* Oct 21, 2020: Version 1.1.0: Added option row and col to the table command.