**[R] estimates table** -- Compare estimation results

__Syntax__

__est__**imates** __tab__**le** [*namelist*] [**,** *options*]

*namelist* is the name given to previously stored estimation results, a
list of names, **_all**, or *****. A name may be **.**, meaning the current
(active) estimates. **_all** and ***** mean the same thing.

*options* Description
-------------------------------------------------------------------------
Main
**stats(***scalarlist***)** report *scalarlist* in table
**star**[**(***#1 #2 #3***)**] use stars to denote significance

Options
__k__**eep(***coeflist***)** report coefficients in order specified
__d__**rop(***coeflist***)** omit specified coefficients from table
__eq__**uations(***matchlist***)** match equations of models as specified

Numerical formats
**b**[**(****%***fmt***)**] how to format coefficients, which are always
reported
**se**[**(****%***fmt***)**] report standard errors and use optional format
**t**[**(****%***fmt***)**] report t or z and use optional format
**p**[**(****%***fmt***)**] report p-values and use optional format
__stf__**mt(****%***fmt***)** how to format scalar statistics

General format
__var__**width(***#***)** use *#* characters to display variable names and
statistics
__model__**width(***#***)** use *#* characters to display model names

**eform** display coefficients in exponentiated form
__varl__**abel** display variable labels rather than variable
names
__new__**panel** display statistics in separate table from
coefficients

__sty__**le(oneline)** put vertical line after variable names; the
default
__sty__**le(columns)** put vertical line separating every column
__sty__**le(noline)** suppress all vertical lines

__cod__**ed** display compact table

Reporting
*display_options* control row spacing, line width, and display of
omitted variables and base and empty cells

__ti__**tle(***string***)** title for table
-------------------------------------------------------------------------
**title()** does not appear in the dialog box.

__Menu__

**Statistics > Postestimation**

__Description__

**estimates** **table** organizes estimation results from one or more models in a
single formatted table.

__Options__

+------+
----+ Main +-------------------------------------------------------------

**stats(***scalarlist***)** specifies a list of any of or all the names of scalars
stored in **e()** to be displayed in the table. *scalarlist* may also
contain the following:

**aic** Akaike's information criterion
**bic** Schwarz's Bayesian information criterion
**rank** rank of **e(V)** (*#* of free parameters in model)

The specified statistics do not have to be available for all
estimation results being displayed.

For example, **stats(N ll chi2 aic)** specifies that **e(N)**, **e(ll)**,
**e(chi2)**, and AIC be included. In Stata, **e(N)** records the number of
observations; **e(ll)**, the log likelihood; and **e(chi2)**, the chi-squared
test that all coefficients in the first equation of the model are
equal to zero.

**star** and **star(***#1 #2 #3***)** specify that stars (asterisks) are to be used to
mark significance. The second syntax specifies the significance for
one, two, and three stars. If you specify simply **star**, that is
equivalent to specifying **star(.05** **.01** **.001)**, which means one star (*)
if *p* < 0.05, two stars (**) if *p* < 0.01, and three stars (***) if *p* <
0.001.

The **star** and **star()** options may not be combined with the **se**, **t**, or **p**
option.

+---------+
----+ Options +----------------------------------------------------------

**keep(***coeflist***)** and **drop(***coeflist***)** are alternatives; they specify
coefficients to be included or omitted from the table. The default
is to display all coefficients.

If **keep()** is specified, it specifies not only the coefficients to be
included but also the order in which they appear.

A *coeflist* is a list of coefficient names, each name of which may be
simple (for example, **price**), an equation name followed by a colon
(for example, **mean:**), or a full name (for example, **mean:price**).
Names are separated from each other by blanks.

When full names are not specified, all coefficients that match the
partial specification are included. For instance, **drop(_cons)** would
omit **_cons** for all equations.

**equations(***matchlist***)** specifies how the equations of the models in
*namelist* are to be matched. The default is to match equations by
name. Matching by name usually works well when all results were fit
by the same estimation command. When you are comparing results from
different estimation commands, however, specifying **equations()** may be
necessary.

The most common usage is **equations(1)**, which indicates that all first
equations are to be matched into one equation named **#1**.

*matchlist* has the syntax

*term* [**,** *term* ... ]

*term* is

[*eqname* **=**] *#***:***#*...**:***#* (syntax 1)

[*eqname* **=**] *#* (syntax 2)

In syntax 1, each *#* is a number or a period (**.**). If a number, it
specifies the position of the equation in the corresponding model;
**1:3:1** would indicate that equation 1 in the first model matches
equation 3 in the second, which matches equation 1 in the third. A
period indicates that there is no corresponding equation in the
model; **1:.:1** indicates that equation 1 in the first matches equation
1 in the third.

In syntax 2, you specify just one number, say, **1** or **2**, and that is
shorthand for **1:1**...**:1** or **2:2**...**:2**, meaning that equation 1 matches
across all models specified or that equation 2 matches across all
models specified.

Now that you can specify a *term*, you can put that together into a
*matchlist* by separating one term from the other by commas. In what
follows, we will assume that three names were specified,

. **estimates table alpha beta gamma,** ...
**equations(1)** is equivalent to **equations(1:1:1)**; we would be saying
that the first equations match across the board.

**equations(1:.:1)** would specify that equation 1 matches in models
**alpha** and **gamma** but that there is nothing corresponding in model
**beta**.

**equations(1,2)** is equivalent to **equations(1:1:1, 2:2:2)**. We would be
saying that the first equations match across the board and so do the
second equations.

**equations(1, 2:.:2)** would specify that the first equations match
across the board, that the second equations match for models **alpha**
and **gamma**, and that there is nothing equivalent to equation 2 in
model **beta**.

If **equations()** is specified, equations not matched by position are
matched by name.

+-------------------+
----+ Numerical formats +------------------------------------------------

**b(***%fmt***)** specifies how the coefficients are to be displayed. You might
specify **b(%9.2f)** to make decimal points line up. There is also a **b**
option, which specifies that coefficients are to be displayed, but
that is just included for consistency with the **se**, **t**, and **p** options.
Coefficients are always displayed.

**se**, **t**, and **p** specify that standard errors, *t* or *z* statistics, and
p-values are to be displayed. The default is not to display them.
**se(***%fmt***)**, **t(%***fmt***)**, and **p(%***fmt***)** specify that each is to be displayed
and specifies the display format to be used to format them.

**stfmt(***%fmt***)** specifies the format for displaying the scalar statistics
included by the **stats()** options.

+----------------+
----+ General format +---------------------------------------------------

**varwidth(***#***)** specifies the number of character positions used to display
the names of the variables and statistics. The default is 12.

**modelwidth(***#***)** specifies the number of character positions used to display
the names of the models. The default is 12.

**eform** displays coefficients in exponentiated form. For each coefficient,
exp(*b*) rather than *b* is displayed, and standard errors are
transformed appropriately. Display of the intercept, if any, is
suppressed.

**varlabel** specifies that variable labels be displayed instead of variable
names.

**newpanel** specifies that the statistics be displayed in a table separated
by a blank line from the table with coefficients rather than in the
style of another equation in the table of coefficients.

**style(***stylespec***)** specifies the style of the coefficient table.

**style(oneline)** specifies that a vertical line be displayed after the
variables but not between the models. This is the default.

**style(columns)** specifies that vertical lines be displayed after each
column.

**style(noline)** specifies that no vertical lines be displayed.

**coded** specifies that a compact table be displayed. This format is
especially useful for comparing variables that are included in a
large collection of models.

+-----------+
----+ Reporting +--------------------------------------------------------

*display_options*: __noomit__**ted**, **vsquish**, __noempty__**cells**, __base__**levels**,
__allbase__**levels**, __nofvlab__**el**, **fvwrap(***#***)**, and **fvwrapon(***style***)**; see **[R]**
**estimation options**.

The following option is available with **estimates table** but is not shown
in the dialog box:

**title(***string***)** specifies the title to appear above the table.

__Examples__

Setup
**. sysuse auto**
**. regress mpg gear turn**
**. estimates store small**
**. regress mpg gear turn length**
**. estimates store large**

Display a table of coefficients for both **small** and **large** estimation
results
**. estimates table small large**

Same as above, but also display standard errors
**. estimates table small large, se**

Same as above, but display coefficients and standard errors to 4 decimal
places
**. estimates table small large, b(%7.4f) se(%7.4f)**

Same as above, but also display sample size and adjusted R-squared
**. estimates table small large, b(%7.4f) se(%7.4f) stats(N r2_a)**

__Stored results__

**estimates table** stores the following in **r()**:

Macros
**r(names)** names of results used

Matrices
**r(coef)** matrix *M*: *n* *x* 2**m*
*M*[*i*, 2*j*-1] = *i*th parameter estimate for model *j*;
*M*[*i*, 2*j* ] = variance of *M*[*i*, 2*j*-1];
*i* = 1, ..., *n*; j = 1, ..., *m*

**r(stats)** matrix *S*: *k x m* (if option **stats()** specified)
*S*[*i*, *j*] = *i*th statistic for model *j*;
i = 1, ..., *k*; *j* = 1, ..., *m*