.- help for ^outreg^, ^outreg5^ (STB-46: sg97, STB-49: sg97.1) .- Write formatted regression output to a text file ------------------------------------------------ After any estimation command: ^outreg^ [varlist] ^using^ filename [^,^ {^se^ | ^p^value} ^nol^abel ^b^dec^(^numlist^)^ ^t^dec^(^#^)^ ^nopa^ren ^br^acket ^noas^ter ^nocon^s ^x^stats ^o^necol ^ef^orm ^at(^matname^)^ ^cla^ssic ^nonob^s ^noni^ ^nor^2 ^ad^jr2 ^rd^ec^(^#^)^ ^nonot^es ^com^ma ^ap^pend ^replace^ ] ^outreg5^ [varlist] ^using^ filename [^,^ outreg_options (except for pvalue, xstats, onecol, bracket, rdec)] Description ----------- ^outreg^ formats regression output as it is presented in most documents: t-statistics or standard errors in parentheses under each coefficient, asterisks indicating coefficients statistically different from zero, and summary statistics like R-squared at the bottom. The formatted output is written to a tab- or comma-separated ASCII file, which can then be loaded into wordprocessing or spreadsheet programs to be converted directly to a table. For example, the output file can be opened in Word97, the text selected, and converted to a table by choosing Table, then Convert Table to Text. ^outreg5^ is the same as ^outreg^, but uses Stata version 5. ^outreg5^ provides backward compatibility for Stata 5.0 users and for STB ado files that have not been updated (at this date) to version 6 such as ^dprobit2^, ^dlogit2^, or ^dmlogit2^. This is important because of the change in the way estimation results are accessed in Stata 6. ^outreg5^ still does not work with a couple of Stata estimation commands - if this happens, try the ^nolabel^ option. ^outreg^ should work after any Stata estimation command (see ^estimation commands^ in Stata manual for a complete list). Like @predict@, ^outreg^ makes use of internally saved estimation results, so it should be invoked immediately after the estimation. In addition to coefficient estimates, it will report number of observations, true R-squareds (but no pseudo R-squareds), the number of groups in panel estimation, and indicate whether @_robust@ or Newey-West heteroskedasticity-consistent errors or t-statistics are reported. ^outreg^ rewards the use of variable @label@s (and value labels for @mlogit@ and @svymlog@). The variable labels are used in the output table (unless ^nolabel^ is chosen), providing more intelligible variable descriptions than 8-letter names. Note that if different variables are assigned the same variable label (not usually done intentionally), and more than one regression is appended together, the coefficients and t-statistics will not be properly ordered. The solution is to use distinct variable labels or the ^nolabel^ option. One can use the label feature to change the title of successive regression results when they are appended together. Simply change the variable label of the dependent variable from one regression to the next, and the new label will appear at the top of each new regression. For example, the label of the dependent variable could be changed from "OLS" to "Fixed Effects" to get the desired headings. If filename is specified without an extension, ^.out^ is assumed. Several regressions with differing variables can be combined into a single table with the ^append^ option. If a varlist is specified, only the regression coefficients corresponding to the variables in varlist will be included in the table. The intercept coefficient is included as well unless the ^nocons^ option is chosen. This is probably most useful for excluding numerous dummy variable coefficients. Time series prefixes are not allowed when using an explicit varlist. Options ------- ^se^ specifies that standard errors rather than t-statistics are reported. ^pvalue^ specifies that p values (of t-statistics) rather than t-statistics are reported. ^nolabel^ specifies that variable names rather than variable labels be used to identify coefficients. It also suppresses the value labels of the dependent variable in @mlogit@ and @svymlog@. ^bdec(^numlist^)^ specifies the number of decimal places reported for coefficient estimates (the b's). It also specifies the decimal places reported for standard errors if ^se^ is chosen. The default value for ^bdec^ is 3. The minimum value is 0 and the maximum value is 11. If one number is specified in the numlist, it will apply to all coefficients. If multiple numbers are specified in the numlist, the first number will determine the decimals reported for the first coefficient, the second number, the decimals in the second coefficient, etc. If there are fewer numbers in the numlist than coefficients, the last number in the numlist will apply to all the remaining coefficients. ^tdec(^#^)^ specifies the number of decimal places reported for t-statistics. It also specifies the decimal places reported for R-squared or adjusted R-squared if they are not specified in ^rdec^. The default value for ^bdec^ is 2. The minimum value is 0 and the maximum value is 11. ^noparen^ specifies that no parentheses be placed around t-statistics or standard errors. ^bracket^ specifies that brackets [] be used rather than parentheses () around t-statistics or standard errors. ^noaster^ specifies that no asterisks denoting 1% and 5% confidence intervals be reported. ^nocons^ specifies that the intercept (constant) coefficient estimate not be reported. ^xstats^ specifies that the extra statistics included in the e(b) matrix be reported. Extra statistics for multi-equation models (i.e. @heckman@, @heckprob@, and @biprobit@) are not reported unless ^onecol^ is also chosen. ^onecol^ specifies that multiequation models (e.g. @mlogit@, @reg3@) be formatted in one column rather than the default of multiple columns, one column per equation. Allows reporting of extra statistics with ^xstats^. ^eform^ specifies that the exponential form of the coefficients be reported. This corresponds to the ^or^ option for @logit@, @clogit@, and @glogit@ estimation, ^irr^ for @poisson@ estimation, ^rrr^ for @mlogit@, ^hr^ for @cox@ hazard models, and ^eform^ for @xtgee@, but it can be used to exponentiate the coefficients after any estimation; see ^[R] maximize - methods and formulas^. ^at(^matname^)^ used after @dprobit@ specifies the point around which the transformation of results is to be made; see @dprobit@. Not required for ^dprobit2^, ^dlogit2^, or ^dmlogit2^ (which must be use ^outreg5^). ^classic^ used after @dprobit@ requests that the mean effects for dummy variables be calculated using the same formula as for continuous variables; see @dprobit@. ^nonobs^ specifies that the number of observations in the estimation not be 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. This option is only meaningful when Stata calculates a true R-squared. ^adjr2^ specifies that the adjusted R-squared be reported rather than the regular R-squared. ^rdec(^#^)^ specifies the number of decimal places reported for the R-squared or adjusted R-squared. The default value for ^rdec^ is the value for ^tdec^. The minimum value is 0 and the maximum value is 11. ^nonotes^ specifies that notes explaining the t-statistics (or standard errors) and asterisks not be included. ^comma^ specifies that the ASCII file output be separated by commas rather than by tabs. ^append^ specifies that new estimation output be appended to an existing output file. The notes at the bottom of the table explaining the t-statistics or standard errors and asterisks are appropriate for the first estimation in the output file. If subsequently appended estimation results use different options (such as ^noaster^, or change the estimations' ^robust^ option), the notes will not be appropriate for all the columns. ^replace^ specifies that it is okay to replace filename if it already exists. Examples -------- . ^outreg using model1^ . ^outreg x1-x3 using model1, se bdec(4) tdec(3) nocons nonotes replace^ . ^dmlogit2 insure age nonwhite^ . ^outreg5 using model1, replace^ . ^regress y x1-x2^ . ^outreg using modl1_3, nolabel replace^ . ^regress y x1-x3^ . ^outreg using modl1_3, nolabel append^ . ^regress y x1-x2 x4^ . ^outreg using modl1_3, bdec(0,1) nolabel append^ . ^type modl1_3.out^ (1) (2) (3) y y y x1 4.069 0.202 4.556 (43.16)** (2.35)* (58.28)** x2 -77.770 -208.994 442.646 (3.34)** (37.16)** (8.71)** x3 3.576 (46.22)** x4 -5.658 (10.77)** Constant -52.940 28.152 -95.236 (8.90)** (13.11)** (16.94)** Observations 100 100 100 R-squared 0.96 1.00 0.98 Absolute value of t-statistics in parentheses * significant at 5% level; ** significant at 1% level . (output of the @type@ command is lined up for readability) Author ------ John Luke Gallup Center for International Development Harvard University john_gallup@@harvard.edu Also see -------- STB: STB-49 sg97.1, STB-46 sg97 Manual: [U] 23 Estimation and post-estimation commands [U] 29 Overview of model estimation [R] estimation commands On-line: help for @postfile@, @outfile@, @outsheet@, @save@;