{smcl}
{* 21may2007}{...}
{cmd:help estout}{right:(SJ7-2: st0085_1; SJ5-3: st0085)}
{hline}

{title:Title}

{p 4 4 2}{hi:estout} {hline 2} Making regression tables from stored estimates


{title:Table of contents}

    {help estout##syn:Syntax}
    {help estout##des:Description}
    {help estout##opt:Options}
    {help estout##exa:Examples}
    {help estout##rem:Remarks}
    {help estout##ref:Backmatter}

{marker syn}
{title:Syntax}

{p 8 15 2}
{cmd:estout} [ {it:namelist} ] [ {cmd:using} {it:filename} ] [ {cmd:,}
 {it:options} ]


    where {it:namelist}  is    {cmd:_all} | {cmd:*} | {it:name} [{it:name} ...]
          {it:name}      is    {it:identifier} | {cmd:.}


    {it:options}{col 38}Description
    {hline 70}
    {help estout##par:Parameter statistics}
      {cmdab:c:ells:(}{it:elements and subopts}{cmd:)}{col 38}{...}
contents of the table cells, where
{col 40}an {it:element}'s {it:subopts} are in paren-
{col 40}theses, i.e., {it:element}[{cmd:(}{it:subopts}{cmd:)}]
          {it:elements}:
          {cmd:b}{col 38}raw coefficient (point estimate)
          {cmd:se}{col 38}standard error
          {cmd:t}{col 38}t or z statistic
          {cmd:p}{col 38}p-value
          {cmd:ci}{col 38}confidence interval
          {cmd:ci_l}{col 38}lower bound of confidence interval
          {cmd:ci_u}{col 38}upper bound of confidence interval
          {cmd:_star}{col 38}significance asterisks
          {cmd:_sign}{col 38}sign of point estimate
          {cmd:_sigsign}{col 38}sign and significance of estimate
          {it:myel}{col 38}results from {cmd:e(}{it:myel}{cmd:)}

          {it:subopts} (for each {it:element}):
          [{cmdab:no:}]{cmdab:s:tar}{col 38}{...}
attach significance asterisks 
          {cmd:fmt(}{it:{help estout##fmt:fmt}} [{it:{help estout##fmt:fmt}} ...]{cmd:)}{col 38}{...}
set the display format(s)
          {cmdab:l:abel:(}{it:string}{cmd:)}{col 38}{...}
define a label for {it:element}
          {cmd:par}[{cmd:(}{it:l} {it:r}{cmd:)}] | {cmd:nopar}{col 38}{...}
place results in parentheses
          {cmdab:v:acant:(}{it:string}{cmd:)}{col 38}{...}
print {it:string} if coefficient is absent
          {cmdab:k:eep:(}{it:keeplist}{cmd:)}{col 38}{...}
drop certain individual results
          {cmdab:d:rop:(}{it:droplist}{cmd:)}{col 38}{...}
keep certain individual results
          {cmdab:pat:tern:(}{it:pattern}{cmd:)}{col 38}{...}
model selection
          {cmdab:pval:ue:(}{it:name}{cmd:)}{col 38}{...}
set p-values for {cmd:star} (default: {cmd:p})
          [{cmd:no}]{cmd:abs}{col 38}{...}
use absolute t statistics

      {cmdab:d:rop:(}{it:droplist}{cmd:)}{col 38}{...}
drop individual parameters
      {cmdab:k:eep:(}{it:keeplist}{cmd:)}{col 38}{...}
keep individual parameters
      {cmdab:o:rder:(}{it:orderlist}{cmd:)}{col 38}{...}
change order of parameters
      {cmdab:i:ndicate:(}{it:groups} [{cmd:,} {it:subopt}]{cmd:)}{col 38}{...}
indicate presence of parameters
        {it:subopt}: {cmdab:l:abels(}{it:yes} {it:no}{cmd:)}{col 38}{...}
redefine "Yes" and "No" labels
      {cmdab:eq:uations:(}{it:eqmatchlist}{cmd:)}{col 38}{...}
match the models' equations
      {cmd:eform}[{cmd:(}{it:pattern}{cmd:)}] | {cmd:noeform}{col 38}{...}
report exponentiated coefficients
      {cmdab:tr:ansform:(}{it:list} [{cmd:,} {it:subopt}]{cmd:)}{col 38}{...}
apply transformations to coefficients
        {it:subopt}: {cmdab:p:attern:(}{it:pattern}{cmd:)}]{cmd:)}{col 38}{...}
select models
      {cmdab:m:argin}[{cmd:(}{cmd:u}|{cmd:c}|{cmd:p}{cmd:)}] | {cmdab:nom:argin}{col 38}{...}
report marginal effects/elasticities
      {cmdab:di:screte:(}{it:string}{cmd:)} | {cmdab:nodi:screte}{col 38}{...}
identify 0/1 variables (if {cmd:margin})
      {cmdab:meq:s:(}{it:eq_list}{cmd:)}{col 38}{...}
select equations for marginal effects
      {cmd:dropped}[{cmd:(}{it:string}{cmd:)}] | {cmd:nodropped}{col 38}{...}
indicate null coefficients as dropped
      {cmd:level(}{it:#}{cmd:)}{col 38}{...}
set level for confidence intervals

    {help estout##sum:Summary statistics}
      {cmdab:s:tats:(}{it:scalarlist}[{cmd:,} {it:subopts}]{cmd:)}{col 38}{...}
display summary statistics at the
{col 38}bottom of the table
        {it:subopts}:
          {cmd:fmt(}{it:{help estout##fmt:fmt}} [{it:{help estout##fmt:fmt}} ...]{cmd:)}{col 38}{...}
set the display formats
          {cmdab:l:abels:(}{it:strlist}[{cmd:,} {col 38}{...}
label the summary statistics
             {it:{help estout##lsub0:label_subopts}}]{cmd:)}
          {cmdab:s:tar}[{cmd:(}{it:sca'list}{cmd:)}] | {cmdab:nos:tar}{col 38}{...}
denote the model significance
          {cmdab:lay:out:(}{it:array}{cmd:)}{col 38}{...}
arrange the summary statistics
          {cmdab:pc:har:(}{it:symbol}{cmd:)}{col 38}{...}
placeholder in {cmdab:layout()}; default is {cmd:@}

    {help estout##sig:Significance asterisks}
      {cmdab:starl:evels:(}{it:levelslist}{cmd:)}{col 38}{...}
define thresholds and symbols,
{col 40}where '{it:levelslist}' is '{it:symbol} {it:#}
{col 40}[{it:symbol} {it:#} ...]' with {it:#} in (0,1] and
{col 40}listed in descending order
      [{cmdab:no:}]{cmdab:stard:etach}{col 38}{...}
display the asterisks in their own column

    {help estout##lay:Layout}
      {cmdab:var:width:(}{it:#}{cmd:)}{col 38}{...}
set width of the table's left stub
      {cmdab:model:width:(}{it:#}{cmd:)}{col 38}{...}
set width of the results columns
      [{cmdab:no:}]{cmdab:uns:tack}{col 38}{...}
place equations from multiple-
{col 40}equation models in separate columns
      {cmdab:beg:in:(}{it:string}{cmd:)}{col 38}{...}
specify the beginning of the rows
      {cmdab:del:imiter:(}{it:string}{cmd:)}{col 38}{...}
specify the column delimiter
      {cmd:end(}{it:string}{cmd:)}{col 38}{...}
specify the ending of the table rows
      {cmdab:dm:arker:(}{it:string}{cmd:)}{col 38}{...}
define the decimal marker
      {cmdab:ms:ign:(}{it:string}{cmd:)}{col 38}{...}
define the minus sign
      [{cmd:no}]{cmd:lz}{col 38}{...}
print the leading zero of fixed
{col 40}format numbers in (-1,1)
      {cmdab:extra:cols(}{it:numlist}{cmd:)}{col 38}{...}
add empty column to the table
      {cmdab:sub:stitute:(}{it:subst}{cmd:)}{col 38}{...}
apply end-of-pipe substitutions, where
{col 40}'{it:subst}' is '{it:from} {it:to} [{it:from} {it:to} ... ]'

    {help estout##lab:Labeling}
      [{cmdab:no:}]{cmdab:l:abel}{col 38}{...}
make use of variable labels
      [{cmdab:no:}]{cmdab:ab:brev}{col 38}{...}
abbreviate long names and labels
      [{cmdab:no:}]{cmd:wrap}{col 38}{...}
wrap long labels (if space permits)
      {cmdab:ti:tle:(}{it:string}{cmd:)}{col 38}{...}
specify a title for the table
      [{cmdab:no:}]{cmdab:le:gend}{col 38}{...}
add a significance symbols legend
      {cmdab:preh:ead:(}{it:strlist}{cmd:)}{col 38}{...}
add text before the table heading
      {cmdab:posth:ead:(}{it:strlist}{cmd:)}{col 38}{...}
add text after the table heading
      {cmdab:pref:oot:(}{it:strlist}{cmd:)}{col 38}{...}
add text before the table footer
      {cmdab:postf:oot:(}{it:strlist}{cmd:)}{col 38}{...}
add text after the table footer
      {cmdab:hl:inechar:(}{it:string}{cmd:)}{col 38}{...}
specify look of {cmd:@hline}
      {cmdab:varl:abels:(}{it:matchlist}[{cmd:,} {it:sub.}]{cmd:)} {col 38}{...}
relabel the parameters
        {it:subopts}:
          {cmdab:bl:ist:(}{it:matchlist}{cmd:)}{col 38}{...}
assign prefixes to certain rows
          {cmdab:el:ist:(}{it:matchlist}{cmd:)}{col 38}{...}
assign suffixes to certain rows
          {it:{help estout##lsub0:label_subopts}}
      {cmdab:ref:cat:(}{it:matchlist}[{cmd:,} {it:subopts}]{cmd:)} {col 38}{...}
add reference category information
        {it:subopts}:
          {cmdab:l:abel:(}{it:string}{cmd:)}{col 38}{...}
redefine the "ref." label
          {cmdab:b:elow}{col 38}{...}
change positioning of refcat
      {cmdab:ml:abels:(}{it:strlist}[{cmd:,} {it:subopts}]{cmd:)}{col 38}{...}
label the models
        {it:subopts}:
          [{cmdab:no:}]{cmdab:dep:vars}{col 38}{...}
use the name/label of the dependent
{col 42}variable as model label
          [{cmdab:no:}]{cmdab:num:bers}{col 38}{...}
number models labels consecutively
          {it:{help estout##lsub0:label_subopts}}
      {cmdab:coll:abels:(}{it:strlist}[{cmd:,} {col 38}{...}
label the columns within models
        {it:{help estout##lsub0:label_subopts}}]{cmd:)}
      {cmdab:eql:abels:(}{it:strlist}[{cmd:,} {col 38}{...}
label the equations
        {it:{help estout##lsub0:label_subopts}}]{cmd:)}
      {cmdab:mgr:oups:(}{it:strlist}[{cmd:,} {it:subopts}]{cmd:)}{col 38}{...}
define and label groups of models
        {it:subopts}:
          {cmdab:pat:tern:(}{it:pattern}{cmd:)}{col 38}{...}
define the grouping of the models
          {it:{help estout##lsub0:label_subopts}}
      {cmdab:num:bers}[{cmd:(}{it:l} {it:r}{cmd:)}] | {cmdab:nonum:bers}{col 38}{...}
add a row containing model numbers

    {help estout##out:Output}
      [{cmdab:no:}]{cmdab:r:eplace}{col 38}{...}
overwrite an existing file
      [{cmdab:no:}]{cmdab:a:ppend}{col 38}{...}
append the output to an existing file
      [{cmdab:no:}]{cmdab:ty:pe}{col 38}{...}
print the table in the results window
      [{cmd:no}]{cmd:showtabs}{col 38}{...}
display tabs as {cmd:<T>}s

    {help estout##def:Defaults}
      {cmdab:sty:le:(}{it:style}{cmd:)}{col 38}{...}
specify a style for the output table

        {it:styles}:
          {cmd:tab}{col 38}tab delimited table
          {cmd:fixed}{col 38}fixed format table
          {cmd:smcl}{col 38}SMCL formatted table
          {cmd:tex}{col 38}table for use with LaTeX
          {cmd:html}{col 38}table for use with HTML
          {it:mystyle}{col 38}user defined addition
    {hline 70}

{marker lsub0}
    {it:{help estout##lsub:label_subopts}}{col 38}Description
    {hline 70}
      [{cmd:no}]{cmd:none}{col 38}{...}
suppress the labels
      {cmdab:p:refix:(}{it:string}{cmd:)}{col 38}{...}
add a common prefix
      {cmdab:s:uffix:(}{it:string}{cmd:)}{col 38}{...}
add a common suffix
      {cmdab:b:egin:(}{it:strlist}{cmd:)}{col 38}{...}
add an overall prefix
      [{cmdab:no:}]{cmdab:f:irst}{col 38}{...}
print the first occurrence of {cmd:begin()}
      {cmdab:e:nd:(}{it:strlist}{cmd:)}{col 38}{...}
add an overall suffix
      [{cmdab:no:}]{cmdab:l:ast}{col 38}{...}
print the last occurrence of {cmd:end()}
      {cmdab:r:eplace}{col 38}{...}
replace global {cmd:begin()}/{cmd:end()}
      [{cmd:no}]{cmd:span}{col 38}{...}
span columns if appropriate
      {cmdab:er:epeat:(}{it:string}{cmd:)}{col 38}{...}
add a "span" suffix
      {cmd:lhs(}{it:string}{cmd:)}{col 38}{...}
label the table's left stub
    {hline 70}

{marker des}
{title:Description}

{p 4 4 2}
{cmd:estout} assembles a table of coefficients, significance asterisks,
summary statistics, standard errors, t or z statistics, p-values,
confidence intervals, and other statistics for one or more models
previously fitted and stored by {helpb estimates store} or
{helpb eststo}. It then writes the table to the Stata log
and/or to a text file specified by {cmd:using}. {it:namelist}
provides the names of the stored estimation sets to be tabulated. You may
use the {cmd:*} and {cmd:?} wildcards in {it:namelist}. The results
estimated last may be indicated by a period ({cmd:.}), even if they
have not yet been stored. If no model is specified, {cmd:estout}
tabulates the estimation sets stored by {cmd:eststo} (see help
{helpb eststo}) or, if no such estimates are present,
the currently active estimates (i.e., the model fit last). {cmd:estout}
may be used after any estimation command that correctly returns its
results in {cmd:e()}.

{p 4 4 2}
See the {help estout##intro:Introduction} in 
{it:{help estout##exa:Examples}} for an introduction on using
{cmd:estout}. See {helpb estimates} for general information
about managing estimation results. Furthermore, see {helpb eststo}
for an alternative to the {cmd:estimates store} command.

{p 4 4 2}
The default for {cmd:estout} is to produce a plain, tab-separated
table containing point estimates. Producing a fully formatted
end product may involve specifying many options. However, a
simple-to-use {cmd:estout} wrapper producing preformatted
publication style tables is available as {helpb esttab}. Furthermore,
use {helpb estadd} to make more results available for
tabulation such as the standardized coefficients or the means and
standard deviations of the regressors.

{p 4 4 2}
Programs similar to {cmd:estout} include {cmd:outreg} by John Luke
Gallup, {cmd:outreg2} by Roy Wada, {cmd:modltbl} by John H. Tyler,
{cmd:mktab} by Nicholas Winter, {cmd:outtex} by Antoine Terracol, or
{cmd:est2tex} by Marc Muendler. Also see Newson (2003) for an
appealing approach.

{marker opt}
{title:Options}

    Contents

        {help estout##par:Parameter statistics}
        {help estout##sum:Summary statistics}
        {help estout##sig:Significance asterisks}
        {help estout##lay:Layout}
        {help estout##lab:Labeling}
        {help estout##out:Output}
        {help estout##def:Defaults}
        {it:{help estout##lsub:label_subopts}}
{marker par}
{dlgtab:Parameter statistics}

{p 4 8 2}
{cmd:cells(}{it:array}{cmd:)} specifies the parameter statistics to be reported
and how they are to be arranged. The default is for cells to report raw
coefficients only; i.e., {cmd:cells(b)}. {cmd:cells(none)} may be used to
completely suppress the printing of parameter statistics. Otherwise,
{cmd:cells(b se)} would result in the reporting of raw coefficients and
standard errors. Multiple statistics are placed in separate rows beneath one
another by default. However, elements of {it:array} that are listed in
quotes; e.g., {cmd:cells("b se")}, are placed beside one another. For
example, {cmd:cells("b p" se)} would produce a table with raw coefficients
and standard errors beneath one another in the first column and p-values in
the top row of the second column for each model.

{p 8 8 2} The parameter statistics available are {cmd:b} (coefficients),
{cmd:se} (standard errors), {cmd:t} (t/z statistics), {cmd:p} (p-values),
and {cmd:ci} (confidence intervals; to display the lower and upper bounds
in separate cells use {cmd:ci_l} and {cmd:ci_u}). Any additional parameter
statistics included in the {cmd:e()} saved results for the models can be
tabulated as well. If, for example, {cmd:e(beta)} contains the standardized
coefficients, type {cmd:cells(beta)} to tabulate them. Use {helpb estadd}
to add statistics such as the standardized coefficients to the
{cmd:e()} saved results of a model. Also see the {cmd:eform} and {cmd:margin}
options for more information on the kinds of statistics that can be
displayed.

{p 8 8 2}Further available elements in {it:array} are
{cmd:_star}, {cmd:_sign}, and {cmd:_sigsign}. {cmd:_star} causes
asterisks denoting the significance of the coefficients to be printed (* for
p<.05, ** for p<.01, and *** for p<.001; customizable via the
{cmd:starlevels()} option below). {cmd:_star} places the significance
asterisks
in their own cells. See the {cmd:star} suboption below if you want to attach
the asterisks to another element. {cmd:_sign} prints the signs of
the coefficients ("+", "-", or "0"). {cmd:_sigsign}, a combination of
{cmd:_star} and {cmd:_sign}, repeats the signs of the
coefficients where the number of repetitions reflects the level of
significance (non-significant coefficients are left empty; however, you may set the
first level to 1 in the {cmd:starlevels()} option).

{p 8 8 2}
A set of suboptions may be specified in parentheses for each element
named in {it:array}. For example, to add significance asterisks to the
coefficients and place the standard errors in parentheses, specify
{bind:{cmd:cells(b(star) se(par))}}. The following suboptions are
available.

{p 12 16 2}
  {cmd:star} specifies that asterisks denoting the significance of the
  coefficients be attached to the statistic: {cmd:*} for p<.05,
  {cmd:**} for p<.01, and {cmd:***} for p<.001. The symbols and the
  values for the thresholds and the number of levels are fully customizable
  (see the
  {help estout##sig:Significance asterisks} options).

{p 12 16 2}
  {cmd:fmt(}{it:{help estout##fmt:fmt}} [{it:{help estout##fmt:fmt}} ...]{cmd:)}
  specifies the display format(s) of a statistic. It defaults to {cmd:%9.0g} or
  the format for the first statistic in {cmd:cells()}. If only one format is
  specified, it is used for all occurrences of the statistic. For example, type

{p 20 20 2}{cmd:. estout} {it:...}{cmd:, cells("b(fmt(3)) t(fmt(2))")}

{p 16 16 2}
  to print coefficients and t-values beside one another using three decimal places
  for coefficients and two decimal places for t-values. If multiple
  formats are specified, the first format is used for the first
  regressor in the estimates table, the second format for the second
  regressor, and so on. The last format is used for the remaining regressors if
  the number of regressors in the table is greater than the number of
  specified formats.  For instance, type

{p 20 20 2}{cmd:. estout} {it:...}{cmd:, cells(b(fmt(3 4 2)))}

{p 16 16 2}
  to use three decimal places for the first coefficient, four decimal places for
  the second, and two decimal places for all remaining coefficients.
  Regardless of the display format chosen,
  leading and trailing blanks are removed from the numbers. White space can
  be added by specifying a {cmd:modelwidth()} (see the
  {help estout##lay:Layout} options). {it:{help estout##fmt:fmt}} may
  be any of Stata's numerical display formats, e.g., {cmd:%9.0g} or
  {cmd:%8.2f}, an integer {it:#} such as {cmd:1} or {cmd:3} to use a fixed format
  with {it:#} decimal places, or {cmd:a}{it:#} such as {cmd:a1} or {cmd:a3}
  to use {cmd:estout}'s adaptive display format (see
  {help estout##fmt:Numerical formats} in {it:{help estout##rem:Remarks}}
  for details).

{p 12 16 2}
  {cmd:label(}{it:string}{cmd:)} specifies a label to appear in the column
  heading. The default is the name of the statistic.

{p 12 16 2}
  {cmd:par}[{cmd:(}{it:l} {it:r}{cmd:)}] specifies that the
  statistic in question be placed in parentheses. It is also possible to specify custom
  "parentheses". For example, {cmd:se(par({ }))} would display the
  standard errors in curly brackets. Or {cmd:se(par(`"="("' `")""'))}
  will write parentheses in a way that Excel can recognize. For
  {cmd:ci} the syntax is:

{p 20 20 2}
   {cmd:ci(par}[{cmd:(}{it:l} {it:m} {it:r}{cmd:)}]{cmd:)}

{p 12 16 2}
  {cmd:vancant(}{it:string}{cmd:)} prints {it:string} if a
  coefficient is not in the model. The default is to leave such cells
  empty.

{p 12 16 2}
  {cmd:drop(}{it:droplist}{cmd:)} drops certain individual statistics. 
  For example, specifying {cmd:t(drop(_cons))} suppresses the
  t statistics for the constants. A {it:droplist} comprises one or more
  specifications, separated by white space. A specification can be either a
  parameter name (e.g., {cmd:price}), an equation name followed by a colon
  (e.g., {cmd:mean:}), or a full name (e.g., {cmd:mean:price}). You may use the
  {cmd:*} and {cmd:?} wildcards in equation names and parameter names. Be sure
  to refer to the matched equation names and not to the original equation
  names in the models when using the {cmd:equations()} option to match
  equations.

{p 12 16 2}
  {cmd:keep(}{it:keeplist}{cmd:)} keeps certain individual statistics. 
  For example, the specification  {cmd:t(keep(mpg))} would display the
  t statistics exclusively for the variable {cmd:mpg}. See the {cmd:drop()}
  suboption above for further details.

{p 12 16 2}
  {cmd:pattern(}{it:pattern}{cmd:)} designates a pattern of models for which
  the statistics are to be reported, where the {it:pattern} consists of zeros
  and ones. A {cmd:1} indicates that the statistic be printed; {cmd:0}
  indicates that it be suppressed. For example {cmd:beta(pattern(1 0 1))}
  would result in {cmd:beta} being reported for the first and third models,
  but not for the second.

{p 12 16 2}
 {cmd:pvalue(}{it:name}{cmd:)} specifies the p-values used to determine
 the significance asterisks (see {cmd:star} above). The default is
 {cmd:pvalue(p)}, indicating that the standard p-values are to be used
 (i.e., the p-values computed form the coefficients vector and the
 variance matrix). Alternatively, specify
 {cmd:pvalue(}{it:mypvalue}{cmd:)}, in which case the significance asterisks will
 be determined from the values in {cmd:e(}{it:mypvalue}{cmd:)}. Values outside
 [0,1] will be ignored.

{p 12 16 2}
  {cmd:abs} specifies that absolute t statistics be used instead of regular
  t statistics (relevant only if used with {cmd:t()}).

{p 4 8 2}
{cmd:drop(}{it:droplist}{cmd:)} identifies the coefficients to be dropped from
the table. A {it:droplist} comprises one or more
specifications, separated by white space. A specification can be either a
parameter name (e.g., {cmd:price}), an equation name followed by a colon
(e.g., {cmd:mean:}), or a full name (e.g., {cmd:mean:price}). You may use the
{cmd:*} and {cmd:?} wildcards in equation names and parameter names. Be sure
to refer to the matched equation names,
and not to the original equation names in the models, when using
the {cmd:equations()} option to match equations.

{p 4 8 2}
{cmd:keep(}{it:keeplist}{cmd:)} selects the coefficients to be included in the
table. {it:keeplist} is specified analogous to {it:droplist} in
{cmd:drop()} (see above). {cmd:keep()} does {it:not} change the
the order of the coefficients. Use {cmd:order()} to change the order
of coefficients.

{p 4 8 2}
{cmd:order(}{it:orderlist}{cmd:)} changes the order of the coefficients
and equations within the table. {it:orderlist} is specified analogous to
{it:droplist} in {cmd:drop()} (see above). Reordering of coefficients
is performed equation by equation, unless equations are
explicitly specified. Coefficients
and equations that do not appear in {it:orderlist} are placed
last (in their original order).

{p 4 8 2}
{cmd:indicate(}{it:groups} [{cmd:,} {cmdab:l:abels(}{it:yes} {it:no}{cmd:)}]{cmd:)}
indicates for each model (or, if {cmd:unstack} is specified, for each equation)
the presence of certain groups of coefficients at the end of the table body. The
syntax for {it:groups} is

            {it:group} [ {it:group} {it:...} ]

{p 8 8 2}where a {it:group} is

            [{it:name} = ] {it:list}

{p 8 8 2}and {it:list} is a list of coefficient specifications as
defined in {cmd:drop()} above. The single groups should be enclosed
in quotes unless there is only one group
and "{it:name} =" is specified. If "{it:name} =" is omitted, the
first element of {it:list} is used as name. Note that {it:name} may
contain spaces.

{p 8 8 2} For example, if some of the models contain a set of year
dummies, say, {cmd:y1 y2 y3}, specify

            {cmd}estout{txt} {it:...}{cmd}, indicate(year effects = y1 y2 y3){txt}

{p 8 8 2}
to drop the dummies from the table and add a "year effects"
row containing
"Yes" for models in which {it:at least one} of the dummies is
present, and "No" for the other models.

{p 8 8 2}
Use the {cmd:labels()} suboption to redefine the indication labels to be
printed in the table. The default is {cmd:labels(Yes No)}. Use quotes
if the labels include spaces,
e.g., {bind:{cmd:labels("in model" "not in model")}}.

{p 4 8 2}
{cmd:equations(}{it:eqmatchlist}{cmd:)} specifies how the models' equations are
to be matched. This option is passed to the internal call of
{cmd:estimates table}. See {helpb estimates} on how to specify this option.
{cmd:estout} automatically matches the models' first equations into an
equation called {cmd:main} if the equations have different
names. Specify {cmd:equations("")} to suppress this behavior.

{p 4 8 2}
{cmd:eform}[{cmd:(}{it:pattern}{cmd:)}] displays the coefficient table in
exponentiated form. The exponent of {cmd:b} is displayed in lieu of the
untransformed coefficient; standard errors and confidence intervals are
transformed as well. Specify a {it:pattern} if the exponentiation is to be
applied only for certain models. For instance, {cmd:eform(1 0 1)} would
transform the statistics for models 1 and 3, but not for model 2.
Unlike {cmd:regress} and {cmd:estimates table}, {cmd:estout} in
eform mode does not suppress the display of the intercept. To drop the
intercept in eform-mode, specify {cmd:drop(_cons)}. Note: {cmd:eform} is
implemented via the {cmd:transform()} option. If both options are specified,
{cmd:transform()} takes precedence over {cmd:eform}.

{p 4 8 2}
{cmd:transform(}{it:list} [, {cmd:pattern(}{it:pattern}{cmd:)}]{cmd:)}
displays transformed coefficients, standard errors and
confidence intervals. {it:list} may be

            {it:fx} {it:dfx}

{p 8 8 2}where {it:fx} is the transformation function and {it:dfx} is
its first derivative. {it:fx} is applied to coefficients
and confidence intervals; that is, {it:fx}({cmd:b}) and {it:fx}({cmd:ci})
are displayed instead of {cmd:b} and {cmd:ci}. {it:dfx} is used to
delta-transform standard errors; i.e., {cmd:se}*{it:dfx}({cmd:b}) is displayed
instead of {cmd:se}. Use {cmd:@} as a placeholder for the function's argument
in {it:fx} and {it:dfx}. For example, type

            {cmd}estout{txt} {it:...}{cmd}, transform(exp(@) exp(@)){txt}

{p 8 8 2}to report exponentiated results (this is equivalent to specifying
the {cmd:eform} option).

{p 8 8 2}{it:list} may also be specified as

{p 12 12 2}{it:coefs} {it:fx} {it:dfx} [ {it:...} [{it:coefs}] {it:fx} {it:dfx} ]

{p 8 8 2}where {it:coefs} identifies the coefficients
to be transformed. Syntax for {it:coefs} is as explained above in the
description of the {cmd:drop()} option (however, include {it:coefs}
in quotes if it contains multiple elements). Say that a model has
two equations, {cmd:price} and {cmd:select}, and you want to
exponentiate the {cmd:price} equation but not the {cmd:select}
equation. You could then type

            {cmd}estout{txt} {it:...}{cmd}, transform(price: exp(@) exp(@)){txt}

{p 8 8 2}Omitting {it:coef} in the last transformation
specification applies the last transformation to all remaining coefficients.

{p 8 8 2}Specify the {cmd:pattern()} suboption if the transformations are to be
applied only for certain models. For instance, {cmd:pattern(1 0 1)} would
apply the transformation to Models 1 and 3, but not Model 2.

{p 4 8 2}
{cmd:margin}[{cmd:(}{cmd:u}|{cmd:c}|{cmd:p}{cmd:)}] indicates that the
marginal effects or elasticities be reported instead of the raw
coefficients. This option has an effect only if {cmd:mfx} has been
applied to a model before its results were stored (see {helpb mfx}) or if a
{cmd:dprobit} (see {helpb probit}), {cmd:truncreg,marginal}
{bind:({helpb truncreg})}, or {cmd:dtobit} (Cong 2000) model is estimated. One
of the parameters {cmd:u}, {cmd:c}, or {cmd:p}, corresponding to the
unconditional, conditional, and probability marginal effects, respectively,
is required for {cmd:dtobit}. The standard errors, confidence
intervals, t statistics, and p-values are transformed as well.

{p 8 8 2}
Using the {cmd:margin} option with multiple-equation models can be tricky.
The marginal effects of variables that are used in several equations are
printed repeatedly for each equation because the equations per se are
meaningless for {cmd:mfx}. To display the effects for certain equations only,
specify the {cmd:meqs()} option. Or use the {cmd:keep()} and
{cmd:drop()} options to eliminate redundant rows. The {cmd:equations()}
option might also be of help here.

{p 4 8 2}
{cmd:discrete(}{it:string}{cmd:)} may be used to override the default symbol and
explanatory text used to identify dummy variables when reporting marginal
effects. The first token in {it:string} is used as the symbol. The default is

{p 12 12 2}
{cmd:discrete(" (d)" for discrete change of dummy variable from 0 to 1)}

{p 8 8 2}
To display explanatory text, specify either the {cmd:legend} option or use
the {cmd:@discrete} variable (see the
{help estout##atvar:Remarks on using @ variables}).

{p 8 8 2}
Use {cmd:nodiscrete} to disable the identification of dummy variables as
such. The default is to indicate the dummy variables unless they have been
interpreted as continuous variables in all of the models for which results are
reported (for {cmd:dprobit} and {cmd:dtobit}, however, dummy variables will
always be listed as discrete variables unless {cmd:nodiscrete} is specified).

{p 4 8 2}
{cmd:meqs(}{it:eq_list}{cmd:)} specifies that marginals be printed only for the
equations in {it:eq_list}. Specifying this option does not affect how the
marginals are calculated.  An {it:eq_list} comprises one or more equation
names (without colons) separated by white space. If you use the
{cmd:equations()} option to match equations, be sure to refer to the matched
equation names and not to the original equation names in the models.

{p 4 8 2}{cmd:dropped}[{cmd:(}{it:string}{cmd:)}] causes null coefficients
(coefficients for which {cmd:e(b)} and {cmd:e(V)} is zero) to be indicated
as dropped. {it:string} specifies the text to be printed in place of
the estimates. The default text is "(dropped)".

{p 4 8 2}
{cmd:level(}{it:#}{cmd:)} assigns the confidence level, as a percentage, for
the confidence intervals of the coefficients (see {helpb level}).

{marker sum}
{dlgtab:Summary statistics}

{p 4 8 2}
{cmd:stats(}{it:scalarlist}[{cmd:,} {it:stats_subopts}]{cmd:)} specifies one or
more scalar statistics -- separated by white space -- to be displayed
at the bottom of the table. The {it:scalarlist} may contain {cmd:e()} scalars
(such as {cmd:N}, {cmd:r2}, or {cmd:chi2}) and the following statistics:

{p 12 24 2}{cmd:aic}{space 5}Akaike's information criterion{p_end}
{p 12 24 2}{cmd:bic}{space 5}Schwarz's Bayesian information criterion{p_end}
{p 12 24 2}{cmd:rank}{space 4}rank of {cmd:e(V)}, i.e., the number of free parameters in model{p_end}
{p 12 24 2}{cmd:p}{space 7}the p-value of the model (overall model significance)

{p 8 8 2}
See {helpb estimates} for details on the {cmd:aic} and {cmd:bic} statistics.
The rules for the determination of {cmd:p} are as follows (although
the procedure outlined below is appropriate for most models, there might be
some models for which it is not):

{p 12 15 2}
    1) p-value provided: if the {cmd:e(p)} scalar is provided by the
    estimation command, it will be interpreted as indicating the p-value
    of the model.

{p 12 15 2}
    2) F test: if {cmd:e(p)} is not provided, {cmd:estout} checks for the
      presence of the {cmd:e(df_m)}, {cmd:e(df_r)}, and {cmd:e(F)}
      scalars and, if they are present, the p-value of the model will be
      calculated as {cmd:Ftail(df_m,df_r,F)}. This p-value corresponds to
      the standard overall  F test of linear regression.

{p 12 15 2}
    3) chi2 test: otherwise, if neither {cmd:e(p)} nor {cmd:e(F)} is
      provided, {cmd:estout} checks for the presence of {cmd:e(df_m)} and
      {cmd:e(chi2)} and, if they are present, calculates the p-value as
      {cmd:chi2tail(df_m,chi2)}. This p-value corresponds to the
      Likelihood-Ratio or Wald chi2 test.

{p 12 15 2}
    4) If neither {cmd:e(p)}, {cmd:e(F)}, nor {cmd:e(chi2)}
      is available, no p-value will be reported.

{p 8 8 2}Type {cmd:ereturn list} after estimating a model to see a list of
  the returned {cmd:e()} scalars (see {helpb ereturn}). Use {helpb estadd}
  (available from the SSC archive) to add extra statistics to {cmd:e()}.

{p 8 8 2}
  The following {it:stats_subopts} are available.

{p 12 16 2}
  {cmd:fmt(}{it:{help estout##fmt:fmt}} [{it:{help estout##fmt:fmt}} {it:...}]{cmd:)}
  sets the display formats for the scalar
  statistics in {it:scalarlist}. {it:{help estout##fmt:fmt}} may
  be any of Stata's numerical display formats, e.g., {cmd:%9.0g} or
  {cmd:%8.2f}, an integer {it:#} such as {cmd:1} or {cmd:3} to use a fixed format
  with {it:#} decimal places, or {cmd:a}{it:#} such as {cmd:a1} or {cmd:a3}
  to use {cmd:estout}'s adaptive display format (see
  {help estout##fmt:Numerical formats} in {it:{help estout##rem:Remarks}}
  for details). For example, {cmd:fmt(3 0)}
  would be suitable for {cmd:stats(r2_a N)}. The
  last specified format is used for the remaining scalars if
  the list of scalars is longer than the list of formats. Thus, only one
  format needs to be specified if all scalars are to be displayed in the same
  format. If no format is specified, the default format is the display format
  of the coefficients.

{p 12 16 2}
  {cmd:labels(}{it:strlist}[{cmd:,} {it:{help estout##lsub:label_subopts}}]{cmd:)}
  to specify labels for rows containing the scalar statistics. If specified, the labels are
  used instead of the scalar names. For example:

{p 20 20 2}
{cmd:. estout} {it:...}{cmd:, stats(r2_a N, labels("Adj. R-Squared" "Number of Cases"))}

{p 16 16 2}Names like {cmd:r2_a} produce an error in
LaTeX because the underscore character has a special meaning in LaTeX (to print the
underscore in LaTeX, type {cmd:\_}). Use the {cmd:label()} suboption to
rename such statistics, e.g., {cmd:stats(r2_a, labels(r2\_a))}. Another
approach is to use {cmd:estout}'s {cmd:substitute()} option (see the
{help estout##lay:Layout} options).

{p 12 16 2}
  {cmd:star}[{cmd:(}{it:scalarlist}{cmd:)}] to specify that the overall
  significance of the model be denoted by asterisks. The asterisks are attached to
  the scalar statistics specified in {it:scalarlist}. If
  {it:scalarlist} is omitted, the asterisks are attached to the first
  reported scalar statistic. The printing of the asterisks is suppressed in
  empty results cells (i.e., if the scalar statistic in question is missing
  for a certain model). The determination of the model significance is
  based on the p-value of the model (see above).

{p 16 16 2}
  Hint: It is possible to attach the asterisks to different scalar statistics
  within the same table. For example, specify
  {cmd:stats(,star(r2_a r2_p))}
  when tabulating OLS estimates and, say, probit estimates. For
  the OLS models, the F test will be carried out and the significance
  asterisks will be attached to the {cmd:r2_a}; for the probit models, the
  chi2 test will be used and the asterisks will appear next to the
  {cmd:r2_p}.

{p 12 16 2}
{cmd:layout(}{it:array}{cmd:)} to rearrange the summary statistics. The default
is to print the statistics in separate rows beneath one another (in
each model's first column). The syntax for {it:array} is

                    <{it:row}> [ <{it:row}> ... ]

{p 16 16 2}
where {it:row} is

                    <{it:cell}> [ <{it:cell}> ... ]

{p 16 16 2}
and {cmd:@} is used as a placeholder for the statistics, one
after another. Rows and cells that contain blanks
have to be embraced in quotes. For example,

                    {cmd} ... stats(chi2 df_m N, layout("@ @" @)){txt}

{p 16 16 2}prints for each model in row 1/column 1 the chi-squared, in
row1/column 2 the degrees of freedom, and in row 2/column 1 the number of
observations. Cells may contain multiple statistics and text other than
the placeholder symbol is printed as is (provided that the cells' statistics
are part of the model). For example,

                    {cmd} ... stats(chi2 df_m N, layout(`""@ (@)""' @)){txt}

{p 16 16 2}
prints a cell containing "chi2 (df_m)" in the first row and the
number of observations in the second row. The number of columns
in the table depends only on the {cmd:cells()} option (see above) and not
on the {cmd:layout()} suboption. If, for example, the table has two columns
per model and you specify three columns of summary statistics, the summary statistics
in the third column are not printed.

{p 12 16 2}
{cmd:pchar(}{it:symbol}{cmd:)} to specify the placeholder symbol
used in {cmdab:layout()}. The default placeholder is {cmd:@}.

{marker sig}
{dlgtab:Significance asterisks}

{p 4 8 2}
{cmd:starlevels(}{it:levelslist}{cmd:)} overrides the default thresholds and
symbols for significance asterisks. For instance,
{bind:{cmd:starlevels(+ 0.10 * 0.05)}}
sets the following thresholds: {cmd:+} for p<.10 and {cmd:*} for
p<.05. Note that the thresholds must lie in the (0,1] interval and must be
specified in descending order. To, for example, denote insignificant results, type
{bind:{cmd:starlevels(* 1 "" 0.05)}}.

{p 4 8 2}
{cmd:stardetach} specifies that a delimiter be placed between the statistics
and the significance asterisks (i.e., that the asterisks are to be displayed in their
own column).

{marker lay}
{dlgtab:Layout}

{p 4 8 2}
{cmd:varwidth(}{it:#}{cmd:)} specifies the number of characters used to display
the names (labels) of regressors and statistics (i.e., {cmd:varwidth}
specifies the width of the table's left stub). Long names (labels) are
abbreviated (depending on the {cmd:abbrev} option) and short or empty
cells are padded out with blanks to fit the width specified by the user.
{cmd:varwidth} defaults to 0, which means that the names are not
abbreviated and no white space is added. Specifying low values may cause
misalignment.

{p 4 8 2}
{cmd:modelwidth(}{it:#}{cmd:)} designates the number of characters used to display
the results columns. If a non-zero {cmd:modelwidth} is specified, model names
are abbreviated if necessary (depending on the {cmd:abbrev} option) and short
or empty results cells are padded out with blanks. In contrast,
{cmd:modelwidth} does not shorten or truncate the display of the results
themselves (coefficients, t statistics, summary statistics, etc.) although it may
add blanks if needed. {cmd:modelwidth} defaults to 0, which means that the
model names are not abbreviated and no white space is added. Specifying low
values may cause misalignment.

{p 8 8 2}
{cmd:modelwidth} allows constructing a fixed-format table, thus making the raw
table more readable. However, the added blanks may cause problems with the
conversion to a table in word processors or spreadsheets.

{p 4 8 2}
{cmd:unstack} specifies that the individual equations from multiple-equation
models (e.g., {cmd:mlogit}, {cmd:reg3}, {cmd:heckman}) be placed in
separate columns. The default is to place the equations below one another in a
single column. Summary statistics will be reported for each equation if
{cmd:unstack} is specified and the estimation command is either {cmd:reg3},
{cmd:sureg}, or {cmd:mvreg} (see {helpb reg3}, {helpb sureg},
{helpb mvreg}).

{p 4 8 2}
{cmd:begin(}{it:string}{cmd:)} specifies a string to be printed at the
beginning of every table row. The default is an empty string. It is possible to
use special functions such as {cmd:_tab} or {cmd:_skip} in
{cmd:begin()}. For more information on using such functions, see the
description of the functions in {helpb file}.

{p 4 8 2}
{cmd:delimiter(}{it:string}{cmd:)} designates the delimiter used between the
table columns. The default is a tab character. See the {cmd:begin} option
above for further details.

{p 4 8 2}
{cmd:end(}{it:string}{cmd:)} specifies a string to be printed at the end of
every table row. The default is an empty string. See the {cmd:begin} option
above for further details.

{p 4 8 2}
{cmd:dmarker(}{it:string}{cmd:)} specifies the form of the decimal marker. The
standard decimal symbol (a period or a comma, depending on the input provided
to {cmd:set dp}; see {help format}) is replaced by {it:string}.

{p 4 8 2}
{cmd:msign(}{it:string}{cmd:)} determines the form of the minus sign. The
standard minus sign ({cmd:-}) is replaced by {it:string}.

{p 4 8 2}
{cmd:lz} specifies that the leading zero of fixed format numbers in the
interval (-1,1) be printed. This is the default. Use {cmd:nolz} to advise
{cmd:estout} to omit the leading zeros (that is, to print numbers like
{cmd:0.021} or {cmd:-0.33} as {cmd:.021} and {cmd:-.33}).

{p 4 8 2}
{cmd:extracols(}{it:{help numlist}}{cmd:)} inserts empty table columns
at the indicated positions. For example, {cmd:extracols(1)} adds
an extra column between the left stub of the table and the first
column.

{p 4 8 2}
{cmd:substitute(}{it:subst_list}{cmd:)} specifies that the substitutions
specified in {it:subst_list} be applied to the estimates table after it has
been created. Specify {it:subst_list} as a list of substitution pairs, that
is:

{p 12 12 2}
{it:from} {it:to} [{it:from} {it:to} ...]

{p 8 8 2}For example, specify {cmd:substitute(_ \_)} to replace the underscore
character (as in {cmd:_cons} or {cmd:F_p}) with its LaTeX equivalent {cmd:\_}.

{marker lab}
{dlgtab:Labeling}

{p 4 8 2}
{cmd:label} specifies that variable labels be displayed instead of variable
names in the left stub of the table.

{p 4 8 2}
{cmd:abbrev} specifies that long names and labels be abbreviated if
a {cmd:modelwidth()} and/or a {cmd:varwidth()} is specified.

{p 4 8 2}
{cmd:wrap} causes long variable labels to be wrapped if space permits and
a {cmd:varwidth()} is specified. The {cmd:wrap} option is useful only if
several parameter statistics are printed beneath one another and, therefore,
white space is available beneath the labels.

{p 4 8 2}
{cmd:title(}{it:string}{cmd:)} may be used to specify a title for the table.
The {it:string} is printed at the top of the table unless {cmd:prehead()},
{cmd:posthead()}, {cmd:prefoot()}, or {cmd:postfoot()} is specified. In
the latter case, the variable {cmd:@title} can be used to insert the title.

{p 4 8 2}
{cmd:legend} adds a legend explaining the significance symbols and
thresholds.

{p 4 8 2}
{cmd:prehead(}{it:strlist}{cmd:)}, {cmd:posthead(}{it:strlist}{cmd:)},
{cmd:prefoot(}{it:strlist}{cmd:)}, and {cmd:postfoot(}{it:strlist}{cmd:)} may
be used to define lists of text lines to appear before and after the table
heading or the table footer. For example, the specification

{p 12 12 2}
{cmd:. estout} {it:...}{cmd:, prehead("\S_DATE \S_TIME" "")}

{p 8 8 2} would add a line containing the current date and time followed by
an empty line before the table. Various substitution functions can be used
as part of the text lines specified in {it:strlist} (see the
{help estout##atvar:Remarks on using @ variables}). For example,
{cmd:@hline} plots a horizontal "line" (series of dashes, by default; see
the {cmd:hlinechar()} option) or {cmd:@M} inserts the number of models
in the table. {cmd:@M} could be used in a LaTeX table heading
as follows:

{p 12 12 2}
{cmd:. estout} {it:...}{cmd:, prehead(\begin{tabular}{l*{@M}{r}})}

{p 4 8 2}
{cmd:hlinechar(}{it:string}{cmd:)} specifies the character(s) to be
used in {cmd:@hline}. The default is {cmd:hlinechar(-)}, resulting in a
dashed line. To produce a solid line, specify {cmd:hlinechar(`=char(151)')}
(Windows only; other systems may use other codes).

{p 4 8 2}
{cmd:varlabels(}{it:matchlist}[{cmd:,} {it:suboptions}]{cmd:)} may be used to
relabel the regressors from the models, where {it:matchlist} is

{p 12 12 2}
{it:name} {it:label} [{it:name} {it:label} ...]

{p 8 8 2} A {it:name} is a parameter name (e.g., {cmd:price}) or a full name
(e.g., {cmd:mean:price}) (abbreviation and wildcards
not allowed). For example, specify {cmd:varlabels(_cons Constant)} to replace
each occurrence of {cmd:_cons} with {cmd:Constant}. (Note that, in LaTeX,
the underscore character produces an error unless it is specified as
{cmd:\_}. Thus, names such as {cmd:_cons} should always be changed if
the estimates table is to be used with LaTeX. The {cmd:substitute()} may also be
helpful; see the {help estout##lay:Layout} options.) The {it:suboptions} are:

{p 12 16 2}
  {cmd:blist(}{it:matchlist}{cmd:)} to assign specific prefixes to
  certain rows in the table body. Specify the {it:matchlist} as pairs of
  regressors and prefixes, that is:

{p 20 20 2}
  {it:name} {it:prefix} [{it:name} {it:prefix} ...]

{p 16 16 2}
  A {it:name} is a parameter name (e.g., {cmd:price}), an equation name
  followed by a colon (e.g., {cmd:mean:}), or a full name
  (e.g., {cmd:mean:price}) (abbreviation and wildcards
   not allowed). Note that equation names cannot be used if the
  {cmd:unstack} option is specified.

{p 12 16 2}
  {cmd:elist(}{it:matchlist}{cmd:)} to assign specific suffixes to
  certain rows in the table body (see the analogous {cmd:blist()} option
  above). This option may, for example, be useful for separating
  thematic blocks of variables by
  adding vertical space at the end of each block. A LaTeX example:

{p 20 20 2}
{cmd:. estout} {it:...}{cmd:, varlabels(,elist(price \addlinespace mpg \addlinespace))}

{p 16 16 2}
  (the  macro {cmd:\addlinespace} is provided by the
  {cmd:booktabs} package in LaTeX)

{p 12 16 2}
  {it:{help estout##lsub:label_subopts}}, which are
  explained in their own section.

{p 4 8 2}
{cmd:refcat(}{it:matchlist}[{cmd:,} {it:suboptions}]{cmd:)} may be used to
insert a row containing information on the reference category
of a categorical variable in the model. {it:matchlist} is

{p 12 12 2}
{it:name} {it:refcat} [{it:name} {it:refcat} ...]

{p 8 8 2} A {it:name} is a parameter name (e.g., {cmd:_Irep78_2})
(abbreviation and wildcards not allowed). For
example, assume that you include the categorical variable {cmd:rep78}
("Repair Record 1978" from the auto dataset) in some of your models
using {cmd:xi} (see {helpb xi}). Since {cmd:rep78} has five
levels, 1 through 5, {cmd:xi} will create 4 dummy variables,
{cmd:_Irep78_2} through {cmd:_Irep78_5}. You can now type

{p 12 12 2}
{cmd:. estout} {it:...}{cmd:, refcat(_Irep78_2 _Irep78_1)}

{p 8 8 2}to add a table row containing "_Irep78_1" in the left stub and
"ref." in each column in which the {cmd:_Irep78_2}
dummy appears.
The {it:suboptions} are:

{p 12 16 2}
  {cmd:label(}{it:string}{cmd:)} to specify the label that is printed
  in the table columns. The default is {cmd:label(ref.)}

{p 12 16 2}
  {cmd:below} to position the reference category row below the specified
  coefficient's row. The default is above. For example, if the 5th
  category of {cmd:rep78} is used as reference category, i.e., if
  {cmd:_Irep78_1} through {cmd:_Irep78_4} are included in the models,
  you might want to type {cmd:refcat(_Irep78_4 _Irep78_5, below)}.

{p 4 8 2}
{cmd:mlabels(}{it:strlist}[{cmd:,} {it:suboptions}]{cmd:)} determines the
model captions printed in the table heading. The default is to use the names of
the stored estimation sets (or their titles, if the {cmd:label} option is
specified and titles are available). The {it:suboptions} for use with
{cmd:mlabels} are:

{p 12 16 2}
  {cmd:depvars} to specify that the name (or label) of the (first) dependent
  variable of the model be used as model label.

{p 12 16 2}
  {cmd:numbers} to cause the model labels to be numbered consecutively.

{p 12 16 2}
  {it:{help estout##lsub:label_subopts}}, which are explained in their own section.

{p 4 8 2}
{cmd:collabels(}{it:strlist}[{cmd:,} {it:{help estout##lsub:label_subopts}}]{cmd:)}
specifies
labels for the columns within models or equations. The default is to compose a
label from the names or labels of the statistics printed in the cells of that
column. The {it:label_subopts} are explained in their own section below.

{p 4 8 2}
{cmd:eqlabels(}{it:strlist}[{cmd:,} {it:{help estout##lsub:label_subopts}}]{cmd:)}
labels the
equations. The default is to use the equation names as stored by the estimation
command, or to use the variable labels if the equation names correspond to
individual variables and the {cmd:label} option is specified. The
{it:label_subopts} are explained in their own section below. 
{bind:{cmd:eqlabels(, none)}} replaces {cmd:_cons} with the
equation name or label, if {cmd:_cons} is the only parameter in an
equation. This is useful, e.g., for tabulating {cmd:ologit} or
{cmd:oprobit} results
in Stata 9. Specify {bind:{cmd:eqlabels("", none)}} to not
replace {cmd:_cons}.

{p 4 8 2}
{cmd:mgroups(}{it:strlist}[{cmd:,} {it:suboptions}]{cmd:)} may be used to
labels groups of (consecutive) models at the top of the table heading. The
labels are placed in the first physical column of the output for the group of
models to which they apply. The {it:suboptions} for use with {cmd:mgroups} are

{p 12 16 2}
  {cmd:pattern(}{it:pattern}{cmd:)} to establish how the models are to be grouped.
  {it:pattern} should be a list of zeros and ones, with ones indicating the
  start of a new group of models. For example,

{p 20 20 2}
{cmd:. estout} {it:...}{cmd:, mgroups("Group 1" "Group 2", pattern(1 0 0 1 0))}

{p 16 16 2}
  would group models 1, 2, and 3 together and then groups models 4 and 5
  together as well. The first group will always start with the first
  model regardless of whether the first token of {it:pattern} is a one or a
  zero.

{p 12 16 2}
  {it:{help estout##lsub:label_subopts}}, which are explained
  in their own section. In
  particular, the {cmd:span} suboption might be of interest here.

{p 4 8 2}
{cmd:numbers}[{cmd:(}{it:l} {it:r}{cmd:)}] adds a row to the table header
displaying consecutive model numbers. The default is to
enclose the numbers in parentheses, i.e., {cmd:(1)}, {cmd:(2)}, etc.
Alternatively, specify {it:l} and {it:r} to change the tokens on the
left and right of each number. For example, {cmd:numbers("" ")")}
would result in {cmd:1)}, {cmd:2)}, etc.

{marker out}
{dlgtab:Output}

{p 4 8 2}
{cmd:replace} permits {cmd:estout} to overwrite an existing file.

{p 4 8 2}
{cmd:append} specifies that the output be appended to an existing file. It
may be used even if the file does not yet exist.

{p 4 8 2}
{cmd:type} specifies that the assembled estimates table be printed in the
results window and the log file. This is the default. Use {cmd:notype} to
suppress the display of the table.

{p 4 8 2}
{cmd:showtabs} requests that tabs be displayed as {cmd:<T>}s in both the
results window and the log file instead of in expanded form. This option does
not affect how tabs are written to the text file specified by {cmd:using}.

{marker def}
{dlgtab:Defaults}

{p 4 8 2}
{cmd:style(}{it:style}{cmd:)} specifies a style for the output
table. {cmdab:def:aults:(}{it:style}{cmd:)} is a synonym for
{cmd:style(}{it:style}{cmd:)}. A style is a named combination of options
that is saved in an auxiliary file called {cmd:estout_}{it:style}{cmd:.def}.
There are five internal styles called {cmd:tab}, {cmd:fixed}, {cmd:smcl},
{cmd:tex}, and {cmd:html}. Their particulars are:

            settings {col 38}styles
            {col 26}{cmd:tab}{col 34}{cmd:fixed}{col 42}{cmd:tex}{col 50}{cmd:html}
            {hline 47}
            {cmd:begin}     {col 50}{cmd:<tr><td>}
            {cmd:delimiter} {col 26}{cmd:_tab}{col 34}{cmd:" "}{col 42}{cmd:&}{col 50}{cmd:</td><td>}
            {cmd:end}       {col 42}{cmd:\\}{col 50}{cmd:</td></tr>}
            {cmd:varwidth}  {col 26}{cmd:0}{col 34}{cmd:12/20}*{col 42}{cmd:12/20}*{col 50}{cmd:12/20}*
            {cmd:modelwidth}{col 26}{cmd:0}{col 34}{cmd:12}{col 42}{cmd:12}{col 50}{cmd:12}
            {cmd:abbrev}    {col 26}off{col 34}on{col 42}off{col 50}off
                                         (* if {cmd:label} is on)

{p 8 8 2}
The {cmd:smcl} style has the same settings as the {cmd:fixed} style but includes
SMCL formatting tags and horizontal lines to structure the table (the {cmd:smcl}
style is suitable to display the table in Stata's results window). The {cmd:tab}
style is the default. See {help estout##defaults:Default files} in the
{help estout##rem:Remarks} section to make available your own style.

{p 8 8 2}
Explicitly specified options take precedence
over settings provided by a style. For example, if you type

            {cmd}. estout, delimiter("") style(tab){txt}

{p 8 8 2}
then the column delimiter will be set to empty string since the
{cmd:delimiter()} option overwrites the default from the {cmd:tab}
style. Similarly, specifying
{cmd:noabbrev} will turn abbreviation off if using the {cmd:fixed}
style.

{marker lsub}
{it:{dlgtab:label_subopts}}

{p 4 4 2}
The following suboptions may be used within the {cmd:mgroups()},
{cmd:mlabels()}, {cmd:collabels()}, {cmd:eqlabels()},
{cmd:varlabels()}, and {cmd:stats(, labels())} options:

{p 4 8 2}
{cmd:none} suppresses the printing of the labels or drops the
part of the table heading to which it applies.

{p 4 8 2}
{cmd:prefix(}{it:string}{cmd:)} specifies a common prefix to be added to each
label.

{p 4 8 2}
{cmd:suffix(}{it:string}{cmd:)} specifies a common suffix to be added to each
label.

{p 4 8 2}
{cmd:begin(}{it:strlist}{cmd:)} specifies a prefix to be printed at the
beginning of the part of the table to which it applies. If {cmd:begin} is
specified in {cmd:varlabels()} or {cmd:stats(,labels())}, the prefix will
be repeated for each regressor or summary statistic.

{p 4 8 2}
{cmd:first} specifies that the first occurrence of the {cmd:begin()} prefix in
{cmd:varlabels()} or {cmd:stats(,labels())} be printed. This
is the default. Use {cmd:nofirst} to suppress the first occurrence of the
prefix. In {cmd:varlabels()}, {cmd:nofirst} applies equationwise, i.e., the first
{cmd:begin()} prefix in each equation is suppressed (unless {cmd:unstack} is
specified).

{p 4 8 2}
{cmd:end(}{it:strlist}{cmd:)} specifies a suffix to be printed at the end of the
part of the table to which it applies. If {cmd:end} is specified in
{cmd:varlabels()} or {cmd:stats(,labels())}, the suffix will be repeated
for each regressor or summary statistic.

{p 4 8 2}
{cmd:last} specifies that the last occurrence of the {cmd:end()} suffix in
{cmd:varlabels()} or {cmd:stats(,labels())} be printed. This
is the default. Use {cmd:nolast} to suppress the last occurrence of the
suffix. In {cmd:varlabels()}, {cmd:nolast} applies equationwise, i.e., the last
{cmd:end()} suffix in each equation is suppressed (unless {cmd:unstack} is
specified).

{p 4 8 2}
{cmd:replace} causes the label suboption {cmd:begin()} prefix and {cmd:end()} suffix
to be used instead of the global {cmd:begin()} and {cmd:end()} strings. The default
is to print both. {cmd:replace} also applies to {cmd:blist()} and {cmd:elist()}
if specified in {cmd:varlabels()}.

{p 4 8 2}
{cmd:span} causes labels to span columns, i.e., extends the labels across
several columns, if appropriate. This suboption is relevant only for the
{cmd:mgroups()}, {cmd:mlabels()}, {cmd:eqlabels()}, and
{cmd:collabels()} options. The {cmd:@span} string returns the number of
spanned columns if it is included in the label, prefix, or suffix. A LaTeX example:

{p 8 8 2}
{cmd:. estout} {it:...}{cmd:, mlabels(, span prefix(\multicolumn{@span}{c}{) suffix(}))}

{p 4 8 2}
{cmd:erepeat(}{it:string}{cmd:)} specifies a string that is repeated for each
group of spanned columns at the end of the row if the {cmd:span}
suboption is specified. This suboption is relevant only for the
{cmd:mgroups()}, {cmd:mlabels()}, {cmd:eqlabels()}, and
{cmd:collabels()} options. If the {cmd:@span} string is included in
{it:string} it will be replaced by the range of columns spanned. A LaTeX example:

{p 8 8 2}
{cmd:. estout} {it:...}{cmd:, mlabels(, span erepeat(\cline{@span}))}

{p 4 8 2}
{cmd:lhs(}{it:string}{cmd:)} inserts {it:string} into the otherwise empty cell
in the left stub of the row of the table heading to which it applies. This
suboption is relevant only for the {cmd:mgroups()}, {cmd:mlabels()},
{cmd:eqlabels()}, and {cmd:collabels()} options.

{marker exa}
{title:Examples}

    Contents
        {help estout##intro:Introduction}
        {help estout##ex1:Publication-style table}
        {help estout##ex2:t statistics for selected variables only}
        {help estout##ex3:Summary statistics only}
        {help estout##ex4:Table of descriptives}
        {help estout##ex5:Unstack multiple equations}
        {help estout##ex6:Marginal effects}

{p 4 4 2} Please first read the {help estout##intro:Introduction}. The
other examples are more advanced and intended for users
already familiar with the basic features of
{cmd:estout}. More examples can be found in Jann (2005).

{marker intro}
{dlgtab:Introduction}

{p 4 4 2}
The full syntax of {cmd:estout} is rather complex and is found
above. However, consider the following basic syntax, which
includes only the most important options:

{p 8 15 2}
{cmd:estout} [ {it:namelist} ] [ {cmd:using} {it:filename} ] [ {cmd:,}
 {cmdab:c:ells:(}{it:array}{cmd:)}
 {cmdab:s:tats:(}{it:scalarlist}{cmd:)}
 {cmdab:sty:le:(}{it:style}{cmd:)}
 {it:more_options}
 ]

{p 4 4 2}
where {it:namelist} is a list of the names of stored estimation sets (the name
list can be entered as {cmd:*} to refer to all stored estimates). The
{cmd:cells()} and {cmd:stats()} options determine the primary contents of
the table. The {cmd:style()} option determines the basic formatting of the
table.

{p 4 4 2}{ul:Basic usage}

{p 4 4 2}
The general procedure for using {cmd:estout} is to first store several models
using the {cmd:estimates store} or the {helpb eststo} command and then apply
{cmd:estout} to save and/or display a table of the estimates. By default,
{cmd:estout} produces a plain, tab separated table of the coefficients of the
models indicated by the command:

        {cmd}. sysuse auto
        {cmd}. replace price = price / 1000
        {cmd}. replace weight = weight / 1000
        {cmd}. regress price weight mpg
        {cmd}. estimates store m1, title(Model 1)
        {cmd}. generate forXmpg = foreign * mpg
        {cmd}. regress price weight mpg forXmpg foreign
        {cmd}. estimates store m2, title(Model 2)
        {cmd}. estout * using example.txt
        {txt}{...}

{p 4 4 2}
The table produced by the {cmd:estout} command looks messy in the Stata
Results window or the Stata log because the columns are tab separated
(tab characters are not preserved in the Results window or the
log). However, the stored {cmd:example.txt} would look tidy if it were
opened, for example, in a spreadsheet program.

{p 4 4 2}{ul:Choosing a style}

{p 4 4 2}
To align the columns, fixed widths can be specified for the columns and tab
characters can be removed. This is most easily done via the {cmd:style()}
option, which provides a style called {cmd:fixed}:

        {cmd}. estout *, style(fixed)
        {txt}{...}

{p 4 4 2}
Other predefined styles are {cmd:tab} (the default), {cmd:tex}, and
{cmd:html}, but one can also define one's own styles (see
{help estout##defaults:Default files} in {it:{help estout##rem:Remarks}}).
The {cmd:tex} style, for example, modifies the output table for use with
LaTeX's tabular environment:

        {cmd}. estout *, style(tex) varlabels(_cons \_cons)
        {txt}{...}

{p 4 4 2}
{cmd:_cons} has been replaced by its LaTeX equivalent in the example above
using the {cmd:varlabels()} option (the underscore character produces an
error in LaTeX unless it is preceded by a backslash). For more
information on the {cmd:varlabels()} option, see {cmd:estout}'s
{help estout##lab:Labeling} options.

{p 4 4 2}{ul:The cells option}

{p 4 4 2}
Use the {cmd:cells()} option to specify the parameter statistics to be
tabulated and how they are to be arranged. The parameter statistics
available are {cmd:b} (coefficients; the default), {cmd:se} (standard
errors), {cmd:t} (t/z statistics), {cmd:p} (p-values), {cmd:ci}
(confidence intervals; to display the lower and upper bounds in separate
cells use {cmd:ci_l} and {cmd:ci_u}), as well as any additional
parameter statistics included in {cmd:e()} for the models
(see {cmd:estout}'s {help estout##par:Parameter Statistics} options). For
example, {cmd:cells(b se)} results
in the reporting of raw coefficients and standard errors:

        {cmd}. estout *, cells(b se) style(fixed)
        {txt}{...}

{p 4 4 2}
Multiple statistics are placed in separate rows beneath one another by
default as in the example above. However, elements that are listed in
quotes are placed beside one another. For
example, specifying {cmd:cells("b se t p")} produces the following table:

        {cmd}. estout m2, cells("b se t p") style(fixed)
        {txt}{...}

{p 4 4 2}
The two approaches can be combined. For example, {cmd:cells("b p" se)}
would produce a table with raw coefficients and standard errors beneath one
another in the first column and p-values in the top row of the second
column for each model.

{p 4 4 2}
For each statistic named in the {cmd:cells()} option a set of
suboptions may be specified in parentheses. For example, in social sciences
it is common to report standard errors or t statistics in parentheses beneath
the coefficients and to indicate the significance of individual
coefficients with asterisks. Furthermore, the results are rounded. Just such a
table can be created using the following procedure:

        {cmd}. estout *, cells(b(star fmt(3)) t(par fmt(2))) style(fixed)
        {txt}{...}

{p 4 4 2}
The {cmd:estout} default is to display {cmd:*} for p<.05,
{cmd:**} for p<.01, and {cmd:***} for p<.001. However, 
the significance thresholds and symbols are fully customizable (see
{cmd:estout}'s {help estout##sig:Significance asterisks} options).

{p 4 4 2}{ul:The stats option}

{p 4 4 2}
Finally, use the {cmd:stats()} option to specify scalar
statistics to be displayed in the last rows of each model's table. The
available scalar statistics are {cmd:aic} (Akaike's information criterion),
{cmd:bic} (Schwarz's Bayesian information criterion), {cmd:rank} (the rank of
{cmd:e(V)}, i.e., the number of free parameters in model), {cmd:p} (the
p-value of the model), as well as any scalar contained in
{cmd:e()} for the models (see
{cmd:estout}'s
{help estout##sum:Summary statistics} options). For example, specify
{cmd:stats(r2 bic N)} to add the R-squared, BIC, and the number of cases to
the bottom of the
table:

        {cmd}. estout *, stats(r2 bic N) style(fixed)
        {txt}{...}

{marker ex1}
{dlgtab:Publication-style table}

        {cmd}. label variable foreign "Foreign car type"
        {cmd}. label variable forXmpg "Foreign*Mileage"
{phang2}{cmd}. estout *, cells(b(star fmt(%9.3f)) se(par))
         stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared))
         legend label collabels(, none)
         varlabels(_cons Constant) posthead("")
         prefoot("") postfoot("")
         varwidth(16) modelwidth(12) delimiter("")
	{txt}{...}

{marker ex2}
{dlgtab:t statistics for selected variables only}

{phang2}{cmd}. estout *, cells(b(star) t(par keep(mpg))) style(fixed)
	{txt}{...}

{marker ex3}
{dlgtab:Summary statistics only}

{phang2}{cmd}. estout *, cells(none) stats(r2_a bic N, star) style(fixed)
	{txt}{...}

{marker ex4}
{dlgtab:Table of descriptives}

        {cmd}. quietly generate x = uniform()
        {cmd}. quietly regress x price weight mpg foreign
        {cmd}. estadd mean
        {cmd}. estadd sd, nobinary
        {cmd}. estimates store m3
{phang2}{cmd}. estout m3, cells("mean sd") stats(N) mlabels(,none)
         drop(_cons) style(fixed)
	{txt}{...}

{marker ex5}
{dlgtab:Unstack multiple equations}

{phang2}{cmd}. sureg (price foreign weight length) (mpg displ = foreign weight)
{p_end}
        {cmd}. estimates store m4
{phang2}{cmd}. estout m4, cells(b t(par)) unstack stats(r2 chi2 p) style(fixed)
	{txt}{...}

{marker ex6}
{dlgtab:Marginal effects}

        {cmd}. generate record = 0
        {cmd}. replace record = 1 if rep > 3
        {cmd}. logit foreign mpg record
        {cmd}. estimates store raw
        {cmd}. mfx
        {cmd}. estimates store mfx
{phang2}{cmd}. estout raw mfx, cells("b Xmfx_X(pattern(0 1))" se(par))
         margin legend style(fixed)
	{txt}{...}


{marker rem}
{title:Remarks}

    Contents

        {help estout##fmt:Numerical formats}
        {help estout##spchar:Special characters}
        {help estout##atvar:Using @ variables}
        {help estout##defaults:Default files}
{marker fmt}
{dlgtab:Numerical formats}

{p 4 4 2}
Numerical display formats may be specified in {cmd:estout}
as follows:

{p 5 8 2}
1. Official Stata's display formats: You may specify formats, such as
{cmd:%9.0g} or {cmd:%8.2f}. See {helpb format} for a list
of available formats.

{p 5 8 2}
2. Fixed format: You may specify an integer value such as {cmd:0},
{cmd:1}, {cmd:2}, etc. to request a display format with a fixed number
of decimal places. For example, {cmd:cells(t(fmt(3)))} would display
t statistics with three decimal places.

{p 5 8 2}
3. Automatic format: You may specify {cmd:a1}, {cmd:a2}, ..., or
{cmd:a9} to cause {cmd:esttab} to choose a reasonable display format for
each number depending on the number's value. The {it:#} in
{cmd:a}{it:#} determines the minimum precision according to the
following rules:

{p 10 12 2}
o Absolute numbers smaller than 1 are displayed with {it:#}
significant decimal places (i.e., with {it:#} decimal places ignoring
any leading zeros after the decimal point). For example,
{cmd:0.00123456} is displayed as {cmd:0.00123} if the format is
{cmd:a3}.

{p 10 12 2}
o Absolute numbers greater than 1 are displayed with as many digits
required to retain at least one decimal place and are displayed with
a minimum of ({it:#} + 1) digits. For example, if the format is
{cmd:a3}, {cmd:1.23456} is displayed as {cmd:1.235}, {cmd:12.3456} is
displayed as {cmd:12.35}, and {cmd:1234.56} is displayed as
{cmd:1234.6}.

{p 10 12 2}
o In any case, integers are displayed with zero decimal places, and
large or small absolute numbers are displayed in
exponential format.

{marker spchar}
{dlgtab:Special characters}

{p 4 4 2}
The {cmd:\} and {cmd:$} characters and quotation marks have
special meanings in Stata. You should therefore consider the following
instructions if you, for example, intend to specify awkward delimiters or
specify special characters in labels:

{p 6 8 2}- Strings containing unmatched quotes should be enclosed in compound double
quotes (thus, {cmd:delimiter(`"""')} results in columns
delimited by {cmd:"}, whereas {cmd:delimiter(")} produces an error).

{p 6 8 2}- The backslash character is used to delay macro expansion in
Stata. Specifying {cmd:\\} just results in the printing of {cmd:\}. To get
a double backslash (the {cmd:\newline} command in TeX), type {cmd:\\\}.

{p 6 8 2}- The dollar sign is used for global macro expansion in Stata. Thus,
{cmd:$x} would display the contents of global macro
{cmd:x} (or nothing, if the macro is empty). Therefore, use
{cmd:\$} to produce {cmd:$} in the output.

{p 4 4 2}
Stata's {cmd:char()} function may also be used to specify odd characters
(see {help strfun}). In particular, {cmd:"`=char(9)'"}
results in a tab character and {cmd:"`=char(13)'"} results
in a carriage return. For example, {bind:{cmd:delimiter(" `=char(9)' ")}}
specifies that a tab character with a leading and
a trailing blank be used as delimiter.

{p 4 4 2} {it:Tip:} It is sometimes useful to set the format of all cells in a
spreadsheet to "Text" before pasting the estimates table. This prevents the
spreadsheet program from trying to interpret the cells and ensures that the contents
of the table remain unchanged.

{marker atvar}
{dlgtab:Using @ variables}

{p 4 4 2}
{cmd:estout} features several variables that can be used within string
specifications. The following list provides an overview of these variables.

{p 5 8 2}o{space 2}In {cmd:prehead()},  {cmd:posthead()}, {cmd:prefoot()},
  and {cmd:postfoot()}, in the {cmd:begin()} and {cmd:end()} label
  suboptions, and in the {cmd:blist()} and {cmd:elist()} suboptions
  in {cmd:varlabels()}:

{p 12 16 2}{cmd:@span} to return the value of a count variable for the total number of physical
  columns of the table.

{p 12 16 2}{cmd:@M} to return the number of models in the table.

{p 12 16 2}{cmd:@E} to return the total number columns containing separate equations.

{p 12 16 2}{cmd:@width} to return the total width of the table (number of characters).

{p 12 16 2}{cmd:@hline} to return a horizontal line (series of dashes, by default;
  see the {cmd:hlinechar()} option).

{p 5 8 2}o{space 2}In {cmd:prehead()},  {cmd:posthead()}, {cmd:prefoot()},
  and {cmd:postfoot()}:

{p 12 16 2}{cmd:@title} to return the title specified with the {cmd:title()} option.

{p 12 16 2}{cmd:@discrete} to return the explanations provided by the
  {cmd:discrete()} option (provided that the  {cmd:margin} option is activated).

{p 12 16 2}{cmd:@starlegend} to return a legend explaining the significance symbols.

{p 5 8 2}o{space 2}In the   {cmd:prefix()} and {cmd:suffix()} suboptions of {cmd:mgroups()},
  {cmd:mlabels()}, {cmd:eqlabels()}, and
  {cmd:collabels()}, and in the labels specified in these options:

{p 12 16 2}{cmd:@span} to return the number of spanned columns.

{p 5 8 2}o{space 2}In the {cmd:erepeat()} suboption of
  {cmd:mgroups()}, {cmd:mlabels()}, {cmd:eqlabels()}, and
  {cmd:collabels()}:

{p 12 16 2}{cmd:@span} to return the range of spanned columns (e.g.,
  {cmd:2-4} if columns 2, 3 and 4 are spanned).

{marker defaults}
{dlgtab:Default files}

{p 4 4 2}{ul:Creating new default files:}

{p 4 4 2}
To make available one's own set
of default options, proceed as follows:

{p 8 11 2}
1. Download {cmd:estout_mystyle.def} from the SSC archive (click
{stata "copy http://fmwww.bc.edu/repec/bocode/e/estout_mystyle.def estout_mystyle.def, text":here}
to copy the file from SSC and store it in the working directory).

{p 8 11 2}
2. Open {cmd:estout_mystyle.def} in a text editor and make the desired
modifications (click {stata "doedit estout_mystyle.def":here} to open
{cmd:estout_mystyle.def} in Stata's Do-File Editor).

{p 8 11 2}
3. Save the file in the current directory or elsewhere
in the ado-file path as {cmd:estout_}{it:newstyle}{cmd:.def}
(see {helpb sysdir}).

{p 4 4 2}To use the new options set in {cmd:estout}, then type:

        {cmd:. estout} {it:...} {cmd:, style(}{it:newstyle}{cmd:)}


{p 4 4 2}{ul:Default file syntax:}

{p 4 4 2}
{cmd:estout} has two main types of options, which are treated differently
in default files. On the one hand, there are simple on/off options without
arguments, like {cmd:legend} or {cmd:showtabs}. To turn such an option on,
enter the option followed by the options name as an argument; i.e., add the
line

        {it:option} {it:option}

{p 4 4 2}
to the default file. For example,

        {cmd:legend legend}

{p 4 4 2}
specifies that a legend be printed in the table footer. Otherwise, if you want
to turn the option off, just delete or comment out the line that contains it (or
specify {it:option} without an argument).

{p 4 4 2}
To temporarily turn off an option that has been activated in a default file,
specify {cmd:no}{it:option} in the command line (do not, however, use
{cmd:no}{it:option} in default files). For example, if the legend has been
turned on in the default file, but you want to suppress it in a specific call of
{cmd:estout}, type

        {cmd:. estout} {it:...}{cmd:, nolegend}

{p 4 4 2}
On the other hand, there are options that take arguments, such as
{cmd:prehead(}{it:args}{cmd:)}, {cmd:delimiter(}{it:args}{cmd:)}, or
{cmd:stats(}{it:args}{cmd:,} {it:...}{cmd:)}. Such options are specified as

        {it:option} {it:args}

{p 4 4 2}
in the default file (where {it:args} must not include suboptions; see
below). Specifying an option in the command line overwrites the settings from
the default file. However, a {cmd:no} form, which exists for the
first option type, is not available here.

{p 4 4 2}
Finally, there are two options that reflect a combination of the first
and second types: {cmd:eform}[{cmd:(}{it:args}{cmd:)}] and
{cmd:margin}[{cmd:(}{it:args}{cmd:)}]. These options can be specified
as either

        {it:option} {it:option}

{p 4 4 2}
or

        {it:option} {it:args}

{p 4 4 2}
in the default file; the {cmd:no} form is allowed.

{p 4 4 2}
Many {cmd:estout} options have suboptions; i.e., an option might take the
form {it:option}{cmd:(}{it:...}{cmd:,} {it:suboption}{cmd:)} or
{it:option}{cmd:(}{it:...}{cmd:,} {it:suboption}{cmd:(}{it:args}{cmd:))}. In
the default file, the suboptions cannot be included in the
definition of a higher-level option. Instead, they must be
specified in their own lines, as either

        {it:optionsuboption} {it:suboption}

{p 4 4 2}
or

        {it:optionsuboption} {it:args}

{p 4 4 2}
For a two-level nesting of options, the name
used to refer to the suboption is a concatenation of the option's name and the
suboption's name,
i.e., {cmd:"}{it:optionsuboption}{cmd:"="}{it:option}{cmd:"+"}{it:suboption}{cmd:"}. For
example, the {cmd:labels()} suboption of the {cmd:stats()} option would be
set by the term {cmd:statslabels}. Analogously, the three-level nesting in
the {cmd:stats()} option yields suboption names composed of three names. For
instance, the suboption called by the command

        {cmd:. estout} {it:...}{cmd:, stats(}{it:...}{cmd:, labels(}{it:...}{cmd:, prefix(}{it:args}{cmd:)))}

{p 4 4 2}
would be referred to as

        {cmd:statslabelsprefix} {it:args}

{p 4 4 2}
in the default file. The {cmd:cells()} option represents an exception to
this rule. It may be defined in the default file using
only a plain array of cells elements without suboptions, e.g.,

        {cmd:cells "b se" p}

{p 4 4 2}
However, the suboptions of the cells elements may be referred to as
{it:el_suboption}, for example

        {cmd:b_star star}

{p 4 4 2}
or

        {cmd:se_par [ ]}


{p 4 4 2}{ul:Comments in default files:}

{p 4 4 2}
The support for comments in default files is limited. In
particular, the {cmd:/*} and {cmd:*/} comment indicators cannot be used.
The other comment indicators work (more or less) as usual, that is:

{p 5 8 2}
 o{space 2}Empty lines and lines beginning with {cmd:*} (with or without preceding
blanks) will be ignored.

{p 5 8 2}
 o{space 2}{cmd://} preceded by one or more blanks indicates that the rest of the
line should be ignored. Lines beginning with {cmd://} (with or without preceding
blanks) will be ignored.

{p 5 8 2}
 o{space 2}{cmd:///} preceded by one or more blanks indicates that the rest of the
line should be ignored and the part of the line preceding it should be added to
the next line. {cmd:///} can be used to split commands into
two or more lines of code.


{marker ref}
{title:References}

{p 4 8 2}Cong, R. 2000. sg144: Marginal effects of the tobit model.
{it:Stata Technical Bulletin} 56: 27-34.

{p 4 8 2}Jann, B. 2005. Making regression tables from stored estimates.
{it:Stata Journal} 5: 288-308.

{p 4 8 2}Newson, R. 2003. Confidence intervals and p-values for delivery to
the end user. {it:Stata Journal} 3: 245-269.


{marker ack}
{title:Acknowledgements}

{p 4 4 2}I thank many people
for their comments and suggestions. Among them
are
Joao Pedro Azevedo,
Christopher F. Baum,
Elisabeth Coutts,
Henriette Engelhardt,
Jonathan Gardnerand,
Simone Hirschvogl,
Daniel Hoechle,
Friedrich Huebler,
Maren Kandulla,
J. Scott Long,
David Newhouse,
Clive Nicholas,
Fredrik Wallenberg,
Ian Watson, and
Vince Wiggins.


{marker aut}
{title:Author}

    Ben Jann, ETH Zurich, jann@soz.gess.ethz.ch


{marker als}
{title:Also see}

    Manual:  {hi:[R] estimates}

        SJ:  SJ5-3 st0085 (Jann 2005)

{p 4 13 2}Online: 
 {helpb estimates},
 {help estcom},
 {helpb est_table:estimates table},
 {helpb ereturn},
 {helpb format},
 {helpb file},
 {helpb mfx},
 {helpb eststo},
 {helpb esttab},
 {helpb estadd}
{p_end}
