Differences between revisions 1 and 2
Revision 1 as of 2025-04-04 00:58:24
Size: 5279
Comment: Initial commit
Revision 2 as of 2025-10-24 18:43:56
Size: 5112
Comment: Rewrite
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The '''`estimates`''' command is an interface to estimation results. '''`-estimates-`''' manipulates estimation results.
Line 13: Line 13:
There are several subcommands to the `estimates` command.



=== Store ===
Line 22: Line 16:
estimates store somename estimates store myest
Line 25: Line 19:
The estimates can be accessed like: The estimate results can be accessed like:
Line 28: Line 22:
estimates table somename estimates table myest
Line 31: Line 25:
If a name is omitted from any `estimates` command, then the 'active' or 'latest' estimate results are used. Most commands allow multiple stored estimate results. If a name is omitted from `-estimates-`, then the active/latest estimate results are used.
Line 168: Line 162:
[[https://www.stata.com/manuals/restimates.pdf|Stata manual for estimates]] [[https://www.stata.com/manuals/restimates.pdf|Stata manual for -estimates-]]

Stata estimates

-estimates- manipulates estimation results.


Usage

After fitting a model, try:

estimates store myest

The estimate results can be accessed like:

estimates table myest

If a name is omitted from -estimates-, then the active/latest estimate results are used.

Stats

Try:

. webuse auto
(1978 automobile data)

. regress mpg weight displacement

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(2, 71)        =     66.79
       Model |  1595.40969         2  797.704846   Prob > F        =    0.0000
    Residual |  848.049768        71  11.9443629   R-squared       =    0.6529
-------------+----------------------------------   Adj R-squared   =    0.6432
       Total |  2443.45946        73  33.4720474   Root MSE        =    3.4561

------------------------------------------------------------------------------
         mpg | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      weight |  -.0065671   .0011662    -5.63   0.000    -.0088925   -.0042417
displacement |   .0052808   .0098696     0.54   0.594    -.0143986    .0249602
       _cons |   40.08452    2.02011    19.84   0.000     36.05654    44.11251
------------------------------------------------------------------------------

. estimate stats

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           . |         74  -234.3943  -195.2398       3   396.4796   403.3918
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] BIC note.

Options exist to:

  • aiccorrected: report AICc instead of AIC

  • aicconsistent: report CAIC instead of AIC

  • all: report all criteria

Table

Try:

. estimates table

---------------------------
    Variable |   Active    
-------------+-------------
      weight | -.00656711  
displacement |  .00528078  
       _cons |  40.084522  
---------------------------

. estimates table, star

------------------------------
    Variable |    Active      
-------------+----------------
      weight | -.00656711***  
displacement |  .00528078     
       _cons |  40.084522***  
------------------------------
Legend: * p<0.05; ** p<0.01; *** p<0.001

. estimates table, star b(%10.3f)

------------------------------
    Variable |    Active      
-------------+----------------
      weight |     -0.007***  
displacement |      0.005     
       _cons |     40.085***  
------------------------------
Legend: * p<0.05; ** p<0.01; *** p<0.001

Note that the output of estimates table depends strongly upon the estimate results being used.

. total weight

Total estimation                           Number of obs = 920

--------------------------------------------------------------
             |      Total   Std. err.     [95% conf. interval]
-------------+------------------------------------------------
      weight |   3.73e+07    1209666      3.49e+07    3.96e+07
--------------------------------------------------------------

. estimates table

---------------------------
    Variable |   Active    
-------------+-------------
      weight |   37259397  
---------------------------

Note furthermore these options:

  • stats(statslist) displays the specified statistics with the table

  • keep(varlist) shows only the specified coefficients

  • drop(varlist) suppresses display of the specified coefficients

  • b displays coefficients

    • b(%format) implies c and sets the print format

  • se displays standard errors

    • se(%format) implies se and sets the print format

  • t displays test statistics

    • t(%format) implies t and sets the print format

  • p displays p values

    • p(%format) implies p and sets the print format

  • varwidth(#) sets the display width of variable names

  • varlabel displays variable labels rather than variable names

  • modelwidth(#) sets the display width of model names

Finally, estimates table stores the following results:

  • r(coef): matrix of coefficients

  • r(stats): matrix of statistics, if the stats(statlist) option was used


See also

Stata manual for -estimates-

Stata manual for estimates stats

Stata manual for estimates table


CategoryRicottone

Stata/Estimates (last edited 2025-10-24 18:43:56 by DominicRicottone)