Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Completely new version of -outreg-

From   Roger Newson <>
Subject   Re: st: Completely new version of -outreg-
Date   Thu, 28 Jul 2011 20:17:13 +0100

This sounds like a common problem with Mata libraries in some versions of Stata (at least in my experience). Namely, if a package including a Mata library is installed, then the user's Stata may not update its search path of Mata libraries to search. The fix is to exit Stata after installing the package, and then to launch Stata again before using the package. Stata will then build a new search path of Mata libraries on being launched, and that search path should include the Mata library of the newly installed package.

I hope this helps.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

On 28/07/2011 19:32, John Luke Gallup wrote:

The _CColJoin() function is in a Mata library file l_cfrmt.mlib which should be located in the your adoplus folder ~ado/plus/l.  This file contains Mata routines that are used by multiple .ado files.

Please check to see if the library file is in the right location.  It should be installed there by the -ssc install- command.

If anyone has ideas for why Ricardo is not able to access this library file without restarting Stata, I would appreciate suggestions.


On Jul 28, 2011, at 7:12 AM, Ricardo Ovaldia wrote:

I tryed using the new -outreg-, but I get an error.
Are there additional programs that I need to download?

. sysuse auto, clear
(1978 Automobile Data)

. reg mpg foreign weight

      Source |       SS       df       MS              Number of obs =      74
-------------+------------------------------           F(  2,    71) =   69.75
       Model |   1619.2877     2  809.643849           Prob>  F      =  0.0000
    Residual |  824.171761    71   11.608053           R-squared     =  0.6627
-------------+------------------------------           Adj R-squared =  0.6532
       Total |  2443.45946    73  33.4720474           Root MSE      =  3.4071

         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
     foreign |  -1.650029   1.075994    -1.53   0.130      -3.7955    .4954422
      weight |  -.0065879   .0006371   -10.34   0.000    -.0078583   -.0053175
       _cons |    41.6797   2.165547    19.25   0.000     37.36172    45.99768

. outreg
              MakeSmat():  3499  _CColJoin() not found
             CalcStats():     -  function returned error
                 <istmt>:     -  function returned error

Ricardo Ovaldia, MS
Oklahoma City, OK

--- On Thu, 7/28/11, John Luke Gallup<>  wrote:

From: John Luke Gallup<>
Subject: st: Completely new version of -outreg-
Date: Thursday, July 28, 2011, 12:24 AM
I would like to announce a new
version (4) of the estimation formatting program
-outreg-.  I have rewritten the program from scratch,
making it much more powerful for formatting, and (I hope)
with syntax as simple or simpler than the original.

The new version creates native Word (RTF) files or LaTeX
files, with as complete control of formatting as possible,
including arbitrary arrangement of statistics, font and
font-size control at the cell level, multiple tables in the
same document, etc.  My goal was to allow the creation
of a complete statistical appendix from a single .do file,
with no subsequent format tweaking required in Word or a
LaTeX editor.

I have been working on this new version of -outreg- on and
off for too many years.  Actually -outreg2- grew out of
an intermediate version that was almost completed when I
realized that I wanted to make basic design improvements -
Roy Wada finished the project and has been maintaining and
expanding it since.  -outreg- is almost entirely
written in Mata, with the tables stored in Mata string
matrices, which solves the memory problems that sometimes
occur using -outreg- with very large datasets.

The new version has the following features which I don't
think exist in estimation formatting programs yet:

-  outreg can create any (rectangular) arrangement of
22 possible statistics based on coefficient or marginal
effect estimates.

-  Addition of any summary statistics.

-  Users can specify fonts and font sizes for each
cell of the table, horizontal and vertical bounding lines,
and spacing between table rows.

-  Wide tables can be placed in landscape

-  Cells can span multiple columns.

-  Successive tables can be added to the same
document, with paragraphs of regular text in between.

-  Users can add footnotes or other symbols to any
part of the table, with some effort.

-  Users can include Greek letters and other Unicode
symbols in their text.

-  outreg can be used in loops, including writing to
two or more tables each iteration (e.g. saving multiple
estimates of first and second stage estimation to separate

The new version can be downloaded with the command

. ssc install outreg, replace

Note that this will overwrite the previous version of
-outreg-, with a couple of syntax changes which can make
your legacy .do files using -outreg- not run properly
without some minor editing.

Version 4 has been in use by some people for almost a year,
so it should be quite stable.

The back end of -outreg- may be of interest to Statalist
.ado programmers.  -frmttable.ado-, included in the
-outreg- package, does most of the work, formatting the text
and writing it to Word or Latex files.  -frmttable.ado
is available for use by any other program by passing a Stata
matrix containing the table data along with text for column,
row, and other titles.


John Luke Gallup
Department of Economics
Portland State University

*   For searches and help try:

*   For searches and help try:

*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index