help estimates dialogs: store change restore replay
stats dir table drop/clear
----------------------------------------------------------------------------------------------------------------------
Title
[R] estimates -- Estimation results
Syntax
Store estimation results
estimates store name [, title(str) nocopy]
Replay estimation results
estimates replay [namelist] [, noheader]
Display table of estimation results
estimates table [namelist] [, table_options]
Evaluate postestimation command for stored estimation result sets
estimates for namelist [, noheader nostop] : any_cmd
List model statistics for stored estimation results
estimates stats [namelist]
Display name and title of active estimation results
estimates query
Describe stored estimation results
estimates dir [namelist]
Restore estimation results
estimates restore name [, drop]
Drop stored estimation results, but not results in memory
estimates drop namelist
Drop all stored estimation results
estimates clear
Change title of stored estimation results
estimates change name [, title(str)]
table_options description
----------------------------------------------------------------------------------------------------------------
Main
stats(scalarlist) report scalarlist statistics in the table
star[(#1 #2 #3)] denote significance of coefficients with stars
Options
keep(keeplist) report keeplist coefficients in order specified
drop(droplist) drop droplist coefficients from the table
equations(matchlist) match the equations of the models in namelist according to matchlist; see Options for
details
Numerical formats
b[(fmt)] coefficients are always reported; use display format fmt
se[(fmt)] report standard errors; use display format fmt
t[(fmt)] report t- or z-values; use display format fmt
p[(fmt)] report p-values; use display format fmt
stfmt(fmt) use display format fmt for the scalar statistics
General format
varwidth(#) use # characters to display variable names and statistics; default is varwidth(12)
modelwidth(#) use # characters to display model names; default is modelwidth(12)
eform display coefficient table in exponentiated form
label display variable labels instead of variable names
newpanel display statistics in separate table from the one with coefficients
style(oneline) display vertical line after variables; the default
style(columns) display vertical line after each column (variable names, models)
style(noline) suppress all vertical lines
coded display a compact table
+ title(str) display the title str for the table
----------------------------------------------------------------------------------------------------------------
+ title(str) does not appear in the dialog box.
where name is identifier | .
namelist is _all | * | name [name ...]
estimates may be abbreviated to est and to esti.
Description
estimates provides the preferred method for storing and restoring sets of estimation results. When we say "set
of estimation results", we mean the collection of scalars, macros, matrices, and functions saved in e() after
any given Stata estimation (eclass) command. For brevity, in what follows we refer to a set of estimation
results as an "estimation set" or just a "set". Estimation sets are identified by name. In a namelist, you may
use the * and ? wildcards. _all or * refers to all estimation sets. A period (.) refers to the most recent
("active") estimation set, even if the set has not (yet) been stored.
estimates store stores the active estimation set under name. The results from this set remain active. A set
already stored under name is silently overwritten.
estimates replay replays results from stored estimation sets. If no namelist is specified, results from all
stored sets are replayed.
estimates table displays a table with coefficients and statistics for one or more estimation sets in parallel
columns. In addition, standard errors, t statistics, p-values, and scalar statistics may be listed.
estimates for evaluates a postestimation command for one or more stored estimation sets. The postestimation
command can access the names under which the sets were stored via e(_estimates_name).
estimates stats lists model statistics, including the AIC and BIC model selection indices, for the specified
estimation sets. If no namelist is specified, statistics for all stored sets are listed.
estimates query displays identifying information on the active set of estimation results.
estimates dir lists the names, commands, dependent variables, and descriptions of stored sets. If no namelist
is specified, all stored results are described.
estimates restore restores a stored estimation set, making it the active set so that all postestimation commands
will act on it.
estimates drop permanently drops stored estimation sets. Dropping the active estimation set clears the stored
information (if stored), not the results, from active memory.
estimates clear permanently drops all stored estimation sets.
estimates change sets or modifies the descriptive title of an already stored estimation set.
Typing estimates without a subcommand replays results from the active estimation set.
You may store up to 20 estimation sets. Sets with large numbers of parameters use a considerable amount of
memory. Thus you should drop sets when you no longer need them.
The following postestimation commands refer to estimation sets via the names under which they were stored via
estimates:
hausman Hausman specification test
lrtest Likelihood-ratio test
suest Testing cross-model hypotheses
With the obvious exception of estimates restore, all subcommands of estimates and the postestimation commands do
not change the active estimation results.
Options for estimates store
title(str) specifies a title documenting a stored set. The title is displayed by the subcommands dir, replay,
and for. You may also set or change the title later with the estimates change subcommand.
nocopy specifies that after the results for set name are stored, they no longer be available as the active
estimation results.
Option for estimates replay
noheader suppresses the display of a header describing the name and title of stored set.
Options for estimates table
+------+
----+ Main +----------------------------------------------------------------------------------------------------
stats(scalarlist) specifies one or more scalars to be displayed in the table. scalarlist may contain e()
scalars and the following statistics:
aic Akaike's information criterion
bic Schwarz's information criterion
rank rank of e(V) - number of free parameters in model
scalarlist may be separated by white space or commas. Analogous to coefficients, requested scalars not
saved by a particular estimation command (i.e., not contained in e()) are displayed as blanks. If a period
"." is displayed, it indicates that the e() scalar is stored with a missing value ".".
Example: stats(N ll chi2 aic) specifies that the number of observations, N, the log likelihood, ll, the chi2
test (test that the coefficients in the first equation of the model are 0), and the AIC information
criterion be displayed.
star[(#1 #2 #3)] specifies that the significance of coefficients is denoted by stars: *: p < .05, **: p < .01,
and ***: p < .001. The optional argument may override these thresholds (1 > #1 > #2 > #3 > 0). star may
not be combined with se, t, or p.
+---------+
----+ Options +-------------------------------------------------------------------------------------------------
keep(keeplist) specifies the coefficients (and their order) to be included in the table. A keeplist comprises
one or more specifications, separated by white space: a variable name (e.g., price), an equation name (e.g.,
mean:), or a full name (e.g., mean:price).
drop(droplist) specifies the coefficients to be dropped from the table. A droplist comprises one or more
specifications, separated by white space: a variable name (e.g., price), an equation name (e.g., mean:), or
a full name (e.g., mean:price). All coefficients that match a specification are dropped. drop(_cons) drops
_cons from all equations.
equations(matchlist) specifies how the equations of the models in namelist are to be matched. The most common
usage is equations(1), which indicates that all the first equations in the models are to be matched into one
equation named #1, while the other equations are to be matched by name. If equations() is not specified,
all equations are matched by name. Coefficients within equations are always matched by name, whether or not
equations() is specified.
Generally, matchlist has the syntax
term [, term ...]
where term is
[eqname =] #|#1:#2:...:#m (m = number of models in namelist)
and #j, j = 1,...,m, is a number or a period(.). A term specifies which equations from the models are
matched. The numbers in a term refer to the position of equations in the different models (1 is the first
equation, 2 the second, and so on). A period (.) indicates that no equation should be included for the
associated model. A term that consists of a single number, #, is a convenient shorthand for #:#:...:#,
specifying that the #th equation in all models should be matched. Equations not matched by position are
matched by name.
To specify multiple terms, separate each term by commas (,). Within terms, separate numbers by colons (:)
or blanks.
The matched equation for a term is named eqname in the output and in results returned in r(). eqname should
not be used as an equation name in any of the models. If you do not specify eqname, est table uses the name
#i for the ith term. If you specify keep() or drop() in combination with equations(), be sure to refer to
the matched equation names, not to the equation names in the models.
Some examples may be instructive. Assume that namelist consists of three models.
equations(1:1:1), or equations(1), matches the first equation in the three models into a single equation
named #1; any other equations in the models will be matched by name.
equations(means=1) matches the first equation in the models into a single equation named mean; other
equations of the models are matched by name.
equation(1:.:1) matches the first equation of models 1 and 3 into a single equation named #1 but does
not include any equations from model 2 in #1.
equations(1,2) matches the first equations in the three models into equation #1 and the second equation
in the three models into equation #2, matching any other equations in the models by name.
+-------------------+
----+ Numerical formats +---------------------------------------------------------------------------------------
b[(fmt)] specified without an argument is allowed only for consistency with the options se, t, and p, and has no
effect. Coefficients are always displayed. However, the optional argument may be used to specify the
display format for the coefficients (e.g., b(%9.3f)). It defaults to %10.0g.
se[(fmt)] specifies that the standard errors of the coefficients be displayed below the coefficients. A display
format may be specified as an optional argument (e.g., se(%9.2f)). By default, the display format of the
coefficients is used.
t[(fmt)] specifies that the t- or z-values (coef/se(coef)) be displayed below the coefficients. A display
format may be specified as an optional argument (e.g., t(%9.2f)). It defaults to %7.2f.
p[(fmt)] specifies that the (two-sided) p-values of the coefficients be displayed below the coefficients. As is
standard in Stata, the reference distribution is the t if the estimation command saved the residual degrees
of freedom in e(df_r), and the normal distribution otherwise. A display format may be specified as an
optional argument (e.g., t(%7.2f)). It defaults to %7.4f.
stfmt(fmt) specifies the display format for the scalar statistics. It defaults to the display format of the
coefficients.
+----------------+
----+ General format +------------------------------------------------------------------------------------------
varwidth(#) specifies the number of characters used to display the names of variables and statistics. It
defaults to 12.
modelwidth(#) specifies the number of characters used to display the names of models.
eform displays the coefficient table in exponentiated form: For each coefficient, exp(b) rather than b is
displayed, and standard errors are transformed. Display of the intercept, if any, is suppressed.
label specifies that variable labels are 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(style_spec) specifies the "style" of the coefficients table. The following values are allowed:
style(oneline) specifies that a vertical line be displayed after the variables, but not between the
models
style(columns) specifies that vertical lines be displayed after each column (variable names, models)
style(noline) suppresses all vertical lines
The default style is style(oneline).
coded specifies that a compact table be displayed, in which a model occupies only a single column with cmd:*
representing parameters and statistics computed for the model, and spaces otherwise. This format is
especially useful for comparing variables that are included in a large collection of models.
The following option is available with estimates_table but is not shown in the dialog box:
title(str) specifies the title str for the table.
Options for estimates for
noheader suppresses the display of a header describing the name and title of stored set.
nostop does not stop repeating the command for other stored sets if one of them results in an error.
Option for estimates restore
drop specifies that after the set name is restored, this set is no longer stored for later restoration.
Option for estimates change
title(str) sets or changes the title of a stored estimation set. The title is displayed by the subcommands dir,
replay, and for.
Examples
. logit foreign price trunk
. est store A, title(simple model)
. logit foreign price trunk disp
. est store B
. est dir
. est stats
. est table A B, star
. est restore A
. est change A, ti("a less simple model")
. est for A: test price trunk
. est for A: predict p
. est for .: lstat
. est drop _all
Also see
Manual: [R] estimates
Online: ereturn, _estimates