Research Computing >> Software >> Intercooled Stata >> Stata outreg command


Contributed by Jan Zasowski
Student, Weinberg College of Arts & Sciences

To organize Stata results into publishable tables, we can use a convenient command named outreg, which takes the results of the most recent regression and outputs it into a tab delimited text file. Outreg is available after any estimation command: logit, probit, regress, etc.

This user-contributed "ado" was last updated in STB-59, as sg97_3. It can be installed using the net command, typing "net install outreg" at the Stata command prompt.

The following programs are the basis for the discussion below:

Both "table1.out" and "logittable.out" are tab-delimited ASCII files, which can be opened in any word processor. To download them, right click on the link provided and select "Save Link As..." (or "Save Target As..."). The following paragraphs call attention to a few important features. For more information, refer to the outreg help file.

The following command would create a table after a regression:

 outreg x using table1, se nolabel bdec(3) rdec(3) sigsymb(*,**,+) 10pct coefastr ctitle(I) replace;

Outreg allows the user to specify the coefficients to be displayed in the table (e.g. x), the name of the file in which we wish to make a table (e.g. table1.out), and then a list of options. If you wish, you can only output a subset of the coefficient estimates. The command displays t-statistics under coefficients by default, so we used the 'se' option to include standard errors instead. By default, Outreg denotes significance by placing a symbol next to the t-statistic (or standard error) instead of the coefficient; this can be changed by adding the "coefastr" option. With outreg, it is possible to adjust the number of digits after the decimal point associated with coefficients (bdec) and R2 (rdec), as well as symbols denoting significance (sigsymb).

To make tables with the results from several regressions, add an additional outreg command after each regression you want to include in the table. Using the append command, each new regression is written as an additional column of the table (in table1.out). For example, after a second regression, we specify:

 outreg x z using table1, se nolabel bdec(3) rdec(3) sigsymb(*,**,+) 10pct coefastr ctitle(II) append;

The "ctitle" gives the name of the column, while "append" tells outreg to add the results to the results that are already in table1. In this way, tables can be produced quickly by Stata:

                     (1)           (2)
                      I             II
 x                  1.886*        1.924*
                   (0.232)       (0.097)
 z                                1.343**
 Constant           0.400        -1.973+
                   (0.904)       (0.650)
 Observations       6             6
 R-squared          0.943         0.993
 Standard errors in parentheses
 + significant at 10%; ** significant at 5%; * significant at 1%

The table's notes are added by outreg unless the nonotes option is specified.

© 2001-2010 Kellogg School of Management, Northwestern University