___ ____ ____ ____ ____(R) /__ / ____/ / ____/ ___/ / /___/ / /___/ Statistics/Data Analysis Ur: outreg2 Project: outreg2 > 6100
help outreg2
Titles & related stuffs
笔算是列竖式吗
Examples
0. Basic game plan
1. Prefix and -bys:- 11. Marginal Effects
2. Running loops 12. Word or Excel files
3. Stored estimates 13. TeX files
4. Shorthand 14. Adding column titles or notes
5. Decimal places 15. n-way cross-tabulation
6. Sideway display 16. Group summary table
7. Summary tables 17. Fixed effects or legends
8. Drop/keep/order variables 18. Stats transformation/manipulation
9. Adding r( ) e( ) scalars 19. TBA
10. Odds ratios and rrr 20. Inrt r-class cmd( ) outputs
Different versions of outreg and outreg2
Description
outreg2 provides a fast and easy way to produce an illustrative table
of regression outputs. The regression outputs are produced piecemeal
and are difficult to compare without some type of rearrangement.
outreg2 automates this process by concatenating the successive
regression ouputs in a vertical format. The resulting table is saved
to the disk in ASCII format, which can be read by other programs.
outreg2 thus facilitates the convertion of regression outputs to a
standard format suitable for inclusion in a scholarly publication.
The functionality of outreg2 is bad on the earlier package outreg,
by John Gallup. Unlike outreg, outreg2 is capable of writing
LaTeX-format tables, as well as ASCII, MS Word and MS Excel.
outreg2 can report any regression output, provided it conforms to the
usual convention for ereturn list. This includes most regression
commands in Stata 7 or later. outreg2 will report the latest
regression output by default, or the list of stored estimates. The
ancillary statistics from from stored return can also be accesd
using e() or addstat().
outreg2 will also report the usual statistics such as standard error
with the asterisks for the levels of significance (1%, 5%, and 10%),
t-statistics, p-values, the number of obrvations, R-squareds, and
the number of groups in a panel estimation. Standarized beta
coefficients, exponentially transformed coefficients (i.e. odds/risk女民警
ratios or hazard rate). The ur can add their own column titles with ctitle and addnote options.
An immediate access to the produced table is provided in the browr
view with e option. outreg2 also comes with automatically formatted
number of significant digits, which avoids the awkward displays
assoicated with the fixed format.
Syntax
Full syntax:
outreg2 [varlist] [estlist]using filename [,options] [:command] Shorthand:
outreg2 [varlist] [estlist] [, replace eout] [:command]
where command takes one of estimation commands. The shorthand works
only after a full syntax has been invoked.
Note that filename must be enclod within double quotes if it contains
embedded spaces.
Options
replace create a new file or overwrite the existing file.
eout display the regression table in the browr.
label replace variable names with variable labels, also e stats(label) label() takes the following options for label:
inrt - inrt labels next to variable names
proper - proper cas (capitalize the first letter)
upper - all upper cas
lower - all lower cas
sideway specify sideway display (with standard error next to
coefficient). U paren() or noparen to control the location of
parenthes.
long interweave the equation names into the same column with the variable names column, the default is usually wide. Also specify text if you
want a converted text as well.
尼克买提onecol specify one column to display multiple equations; the default is
usually wide.
wide forces wide format with multiple columns, rarely required.
dta produces Stata file. A suffix "_dta" is added to the file name to
prevent the possible loss of main data.
dta(saveold) produces in older Stata file format, as in saveold.
word produces rich text file (rft) compatible with MS Word. The file
conversion can be specified at any time (you should do it with the
last appedning). The existing file must not be open for it to be
written over.
excel specifies an xml, xls, xlm, or cvs file compatible with a standard spreadsheet like MS Excel. Any existing file with the same name must be clod to have it replaced with a new file.
tex produces TeX output for a TeX typetting program such as Scientific Word.
tex( ) takes the following options for tex:
frag ment - a TeX fragment for inclusion in a document
pr etty - with some italics and varying font sizes
land scape - horizontally
text produces plain text file exactly. long or label will sometimes cau the main output text file to be different from what might be
expected. U this option to obtain exactly specified text file.
quote specifies quotation marks to enca each obrvation. See the noquote option in outsheet for more details (all the output of
outreg2 comes from string variables). quote may cau problems
appending tables together.
comma specifies that the ASCII file output be parated by commas rather than by tabs. This can cau problems if any of the ur-defined text has commas in it (such as variable labels, ctitle, addstat, or addnote). If that is the ca, consider using quote as well.
stats(stats) contains statistics to be reported per variable, the default is stats(coef ), space or comma parated, restricted to the
estimation sample (single equation), will appear in the order
specified by the ur:
coef tstat pval ci ci_low ci_high beta N sum_w mean Var
sd sum min max skewness kurtosis p1 p5 p10 p25 p50 p75 p90
p95 p99 range iqr cv mean median count corr covar pcorr
mipcorr pcorrpval spearman tau_a tau_b
eqname varname aster label label_pr label_up label_low
blank
str(str) where str is any string or numeric expression
internally stored and recalled as string1,
string2, etc.
cmd(macro: cmd) where macro is to be produced by cmd
internally stored and recalled as cmd1,
cmd2, etc.
stnum(commands) applies Stata or ur-defined commands to numerical forms of the stats( ), u this option for mathematical/numeric operations, comma delimited, u quotes when there is a comma within a command,
usually limited to stats specified in stats( ), also e ststr( )
差异的意思
below for string operations
ststr(commands) applies Stata or ur-defined commands to string forms of the stats( ), u this option to attach symbols or concatenate, comma delimited, u compound quotes if there is a comma in the command,
usually limited to stats specified in stats( ), also e stnum( )
above
eform specifies coefficients to be reported. This corresponds to or
option for logit, clogit, and glogit estimation, irr for poisson
estimation, rrr for mlogit, hr for cox and stcox hazard models, and eform for xtgee. The default form of stcox is the hazard rate form;
u the eform to report it.
level(integer) specifies the confidence level, in percent, for confidence intervals. The default is level(95) or as t by t level, does not affect the significance levels of asterisks.
Short-cut for auxillary statistics
no specifies coefficients reported without std. errors
tstat displays t-statistics under the coefficent
pvalue displays p-values under the coefficent
ci displays conf. intervals under the coefficent
beta displays normalized beta coefficients (e the beta option of
regress)
alpha(numlist) specifies the levels of significance, parated by comma
from the most significant to the least signficiant. Example: alpha(0.001, 0.01, 0.05). Up to 3 are automatically assigned
asterisks. If more than 3 levels are defined, then the symbols must
be specified with symbol(text).
symbol(text) specifies symbols for the levels of significance from the
most significant to the least significant, the default symbol(***, **,*). The significance levels of 0.01, 0.05, and 0.10 will be
微信改定位automatically assigned in that order. If more than 3 symbols are
assigned, then the same number of levels of significance must be
specified using alpha().
海宁盐官观潮asterisk() specifies asterisks to be placed next to them; default stats(coef).
noaster no asterisks denoting statistical significance levels be
reported.
2aster specifies ** for 1% and * for 5%
10pct equivalent to symbol(**,*, +)
auto(integer) the number of automatically formatted decimals, the default is auto(3), i.e. three significant digits not counting the ones (i.e. the digit to the left of the decimal point). This means 1.234 and
0.123 might be displayed, while 12.345 or 0.1234 will be trimmed. A
probable integer is reported without decimals. A very large or small
number will be displayed in exponential format. Specify dec() or bdec() to disable it.
less(integer) specifies how many less significant digits to be displayed
for the auxiliary (non-coefficient) statistics. The default is less(0), meaning no less.
decmark() contains the decimal marker; default decmark(.)
fixed decimals & formats
dec(#) or fmt(type) for everything, default dec(3) and fmt(fc)
where # is fixed decimals between 0 and 11,
and type is one of the following:
e exponential
f fixed
fc fixed with commas for thousands
g general
gc general with commas for thousands
U the following only if you want them different from dec(#) or fmt(ty > pe):
bdec(#) or bfmt(type) for coefficient only
sdec(#) or sfmt(type) for standard error
tdec(#) or tfmt(type) for t-statistics
pdec(#) or pfmt(type) for p-value
cdec(#) or cfmt(type) for conf. interval
rdec(#) or rfmt(type) for r-square
adec(#) or afmt(type) for addstat( ) contents
title(list) titles for your table; comma parated; u quotes for commas within a title. Titles can be added at any time. To era your
title, enca a space between quotes like this: title(" ")并列连词有哪些
ctitle(list) column titles; comma parated for each additonal row;
mi-colon for each additional column; u quotes if comma is part of title. Example: ctitle("Wage, Participation","Wage: Participation"). To specify empty column title, specify ctitle(" ").
cttop(list) place additonal column titles on the top; comma parated,
u quotes for multiple column titles.
addnote(list) add your own notes at the bottom. Must be specified in the first outreg2 call when regression results are appended together. A
blank line can be inrted by including "" as a note.
nonotes specifies that notes and legends explaining the standard errors, asterisks, etc., not be included.
paren(stats) specifies parenthesis ( ) to be placed around the same list as stats( ).
noparen specifies no parenthes be placed around standard errors,
t-statistics, standard errors, etc.
bracket specifies square brackets [ ] be ud rather than parenthes ( ) around standard errors, t-statistics, etc.
bracket(stats) specifies square brackets [ ] to be placed around the same list as stats( ).
e(scalars) reports e-class scalars at the bottom of the table. They may be requested individually, as in e(N ll r2), or for all, by
specifying e(all). The reported e-class statistics are automatically formated by auto-digits, unless adec has been specified for it.
addstat(name, stats,..) access e-class, r-class, s-class scalar
statistics, or just plain numbers in new rows below the R-squared (if shown). Comma parted. The ur must specify both a name and a
value for the statistic. See example.
addtext(name, text,..) specifies ur-added text (including numbers) to be displayed in new lines below the R-squared (if shown). Unlike addstat, addtext will not format numbers nor try to interpret any
e-class text (such as e(N) or e(title)).
adjr2 specifies that the adjusted R-squared be reported rather than the
regular R-squared when available.
nocons specifies that the intercept (constant) be not reported.
noni specifies that the number of groups in a panel data regression not
be reported (e.g. the number of groups specified by the i( ) variable in xtreg).
nor2 specifies that no R-squared (or adjusted R-squared) be reported.
noobs specifies no number of obrvations is to be reported.
drop(varlist) Drop the variables. Do not include the dependent variable in this list.
keep(varlist) Keep and report the variables.
eqdrop(eqlist) Drop the equations from the table
eqkeep(eqlist) Keep and report the equations.
sortvar(varlist) Sort and order variables; non-existent variable names
are ignored.
groupvar(names) Sort and order variable; non-existent names are inrted as super-rows or row-heading.
mfx reports marginal effects as computed by mfx. It will reported
marginal effects instead of estiamted coefficients.
margin(u|c|p) the unconditional, conditional, and probability marginal
effects for truncreg, marginal from STB 52, or dtobit from STB 56.
One of u, c, or p is required after dtobit, corresponding to the
unconditional, conditional, and probability marginal effects,
respectively. It is not necessary to specify margin after dprobit,
dlogit2, dprobit2, or dmlogit2.
sum summary be reported after a regression command, restricted to the
estimation sample, i.e. e(sample)==1, unless no regress exists or raw option specified. This is the same as stats(mean sd).
raw do not restrict the sample to e(sample) or perform cawi dropping. Currently works only with sum. The number of obrvation reported is the maximum.
sum(log) summary table just like the one from log file. Default is raw
(no cawi dropping). U eqdrop( ) or eqkeep( ) to get what you
want.
sum(detail) detailed summary table. Default is raw (no cawi
dropping). U eqdrop( ) or eqkeep( ) to get what you want.属兔男和属龙女相配吗
crosstab n-way cross-tabulation. Varlist is required. The first variable must be counting numbers,
< 0, 1, 2, etc., and the rest must be
non-strings. See example below.