**[R] estimates** -- Save and manipulate estimation results

__Syntax__

Command Reference
-----------------------------------------------------------------
*Save and use results from disk*

__est__**imates** **save** *filename* **[R] estimates save**
__est__**imates** **use** *filename* **[R] estimates save**

__est__**imates** __des__**cribe** **using** *filename* **[R] estimates describe**

__est__**imates** **esample:** ... **[R] estimates save**

-----------------------------------------------------------------
*Store and restore estimates in memory*

__est__**imates** __sto__**re** *name* **[R] estimates store**
__est__**imates** __res__**tore** *name* **[R] estimates store**

__est__**imates** __q__**uery** **[R] estimates store**
__est__**imates** **dir** **[R] estimates store**

__est__**imates** **drop** *namelist* **[R] estimates store**
__est__**imates** **clear** **[R] estimates store**

-----------------------------------------------------------------
*Set titles and notes*

__est__**imates** **title:** *text* **[R] estimates title**
__est__**imates** **title** **[R] estimates title**

__est__**imates** __note__**s:** *text* **[R] estimates notes**
__est__**imates** __note__**s** **[R] estimates notes**
__est__**imates** __note__**s** __l__**ist** ... **[R] estimates notes**
__est__**imates** __note__**s** **drop** ... **[R] estimates notes**

-----------------------------------------------------------------
*Report*

__est__**imates** __des__**cribe** [*name*] **[R] estimates describe**
__est__**imates** __r__**eplay** [*namelist*] **[R] estimates replay**

-----------------------------------------------------------------
*Tables and statistics*

__est__**imates** __tab__**le** [*namelist*] **[R] estimates table**
__est__**imates** __stat__**s** [*namelist*] **[R] estimates stats**
__est__**imates** **for** *namelist***:** ... **[R] estimates for**

-----------------------------------------------------------------

__Description__

**estimates** allows you to store and manipulate estimation results:

o You can save estimation results in a file for use in later
sessions.

o You can store estimation results in memory so that you can

a. switch among separate estimation results and

b. form tables combining separate estimation results.

__Remarks__

**estimates** is for use after you have fit a model, be it with **regress**,
**logistic**, etc. You can use **estimates** after any estimation command,
whether it be an official estimation command of Stata or a
community-contributed one.

**estimates** has three separate but related capabilities:

1. You can save estimation results in a file on disk so that you can
use them later, even in a different Stata session.

2. You can store up to 300 estimation results in memory so that they
are at your fingertips.

3. You can make tables comparing any results you have stored in
memory.

Remarks are presented under the following headings:

Saving and using estimation results
Storing and restoring estimation results
Comparing estimation results

__Saving and using estimation results__

After you have fit a model, say, with **regress**, type

. **sysuse auto**
. **regress mpg weight displ foreign**

You can save the results in a file:

. **estimates save basemodel**

Later, say, in a different session, you can reload those results:

. **estimates use basemodel**

The situation is now nearly identical to what it was immediately after
you fit the model. You can replay estimation results:

. **regress**

You can perform tests:

. **test foreign==0**

And you can use any postestimation command or postestimation capability
of Stata. The only difference is that Stata no longer knows what the
estimation sample, **e(sample)** in Stata jargon was. When you reload the
estimation results, you might not even have the original data in memory.
That is okay. Stata will know to refuse to calculate anything that can
be calculated only on the original estimation sample.

If it is important that you use a postestimation command that can be used
only on the original estimation sample, there is a way you can do that.
You **use** the original data and then use **estimates** **esample:** to tell Stata
what the original sample was.

See **[R] estimates save** for details.

__Storing and restoring estimation results__

Storing and restoring estimation results in memory is much like saving
them to disk. You type

. **estimates store base**

to save the current estimation results under the name **base**, and you type

. **estimates restore base**

to get them back later. You can find out what you have stored by typing

. **estimates dir**

Saving estimation results to disk is more permanent than storing them in
memory, so why would you want merely to store them? The answer is that,
once they are stored, you can use other **estimates** commands to produce
tables and reports from them.

See **[R] estimates store** for details about the **estimates** **store** and **restore**
commands.

__Comparing estimation results__

Let's say that you have done the following:

. **sysuse auto**
. **regress mpg weight displ**
. **estimates store base**
. **regress mpg weight displ foreign**
. **estimates store alt**

You can now get a table comparing the coefficients:

. **estimates table base alt**

**estimates** **table** can do much more; see **[R] estimates table**. Also see **[R]**
**estimates stats**. **estimates** **stats** works similarly to **estimates** **table** but
produces model comparisons in terms of BIC and AIC.