. log using example.log, replace (note: file d:\stata\review\example.log not found) ------------------------------------------------------------------------------- log: d:\stata\review\example.log log type: text opened on: 06 Mar 2001, 09:49:02 . update query (contacting http://www.stata.com) Stata executable folder: D:\STATA\ name of file: wstata.exe currently installed: 05 Feb 2001 latest available: 05 Feb 2001 Ado-file updates folder: D:\STATA\ado\updates\ names of files: (various) currently installed: 05 Feb 2001 latest available: 01 Mar 2001 Recommendation Type -update ado- ------------------------------------------------------------------------------- . update ado (contacting http://www.stata.com) Ado-file update log 1. verifying D:\STATA\ado\updates\ is writeable 2. obtaining list of files to be updated 3. downloading relevant files to temporary area [... output omitted ...] 4. examining files 5. installing files 6. setting last date updated Updates successfully installed. Recommendation See help whatsnew to learn about the new features . use http://www.stata.com/users/vwiggins/auto.dta (1978 Automobile Data) . desc Contains data from http://www.stata.com/users/vwiggins/auto.dta obs: 74 1978 Automobile Data vars: 12 7 Jan 1999 17:49 size: 3,478 (99.6% of memory free) ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- make str18 %-18s Make and Model price int %8.0gc Price mpg int %8.0g Mileage (mpg) rep78 int %8.0g Repair Record 1978 hdroom float %6.1f Headroom (in.) trunk int %8.0g Trunk space (cu. ft.) weight int %8.0gc Weight (lbs.) length int %8.0g Length (in.) turn int %8.0g Turn Circle (ft.) displ int %8.0g Displacement (cu. in.) gratio float %6.2f Gear Ratio foreign byte %8.0g origin Car type ------------------------------------------------------------------------------- Sorted by: foreign . regress price mpg wei for Source | SS df MS Number of obs = 74 -------------+------------------------------ F( 3, 70) = 23.29 Model | 317252881 3 105750960 Prob > F = 0.0000 Residual | 317812515 70 4540178.78 R-squared = 0.4996 -------------+------------------------------ Adj R-squared = 0.4781 Total | 635065396 73 8699525.97 Root MSE = 2130.8 ------------------------------------------------------------------------------ price | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- mpg | 21.8536 74.22114 0.29 0.769 -126.1758 169.883 weight | 3.464706 .630749 5.49 0.000 2.206717 4.722695 foreign | 3673.06 683.9783 5.37 0.000 2308.909 5037.212 _cons | -5853.696 3376.987 -1.73 0.087 -12588.88 881.4933 ------------------------------------------------------------------------------ . net search regression output (contacting http://www.stata.com) 10 packages found (STB listed first) ------------------------------------ sg97_3 from http://www.stata.com/stb/stb59 STB-59 sg97_3. Update to formatting regression output / STB insert by John Luke Gallup, Harvard University / Support: jgallup@hiid.harvard.edu / After installation, see help outreg [... further output omitted ...] . net from http://www.stata.com/stb/stb59 ------------------------------------------------------------------------------- http://www.stata.com/stb/stb59/ STB-59 January 2001 ------------------------------------------------------------------------------- DIRECTORIES you could -net cd- to: .. Other STBs PACKAGES you could -net describe-: dm73_2 Contrasts for categorical variables: update dm83 Renaming variables: changing suffixes dm84 labjl: Adding numerical codes to value labels dm85 listjl: List one variable in a condensed form dm86 Sampling without replacement: absolute sample sizes and keeping all observations sbe36_1 Summary statistics for diagnostic tests sbe41 Ordinary case-cohort design and analysis sbe42 Modeling the process of entry into the first marriage using Hernes model sg158 Random-effects ordered probit sg159 Confidence intervals for correlations sg97_3 Update to formatting regression output ssa14 Global and multiple causes of death life tables from complete or aggregated vital data ------------------------------------------------------------------------------- . net descr sg97_3 ------------------------------------------------------------------------------- package sg97_3 from http://www.stata.com/stb/stb59 ------------------------------------------------------------------------------- TITLE STB-59 sg97_3. Update to formatting regression output DESCRIPTION/AUTHOR(S) STB insert by John Luke Gallup, Harvard University Support: jgallup@hiid.harvard.edu After installation, see help outreg INSTALLATION FILES (type net install sg97_3) sg97_3/outreg.ado sg97_3/outreg.hlp ------------------------------------------------------------------------------- . net install sg97_3 checking sg97_3 consistency and verifying not already installed... installing into d:\stata\ado\stb\... installation complete. . * Stata still holds the estimation results in memory... . * ... and by the way you can use asterisk to insert comments . * into your do- or log-files . . outreg using autoreg, replace bdec(2) se . type autoreg.out Price Mileage (mpg) 21.85 (74.22) Weight (lbs.) 3.46 (0.63)** Car type 3,673.06 (683.98)** Constant -5,853.70 (3,376.99) Observations 74 R-squared 0.50 Standard errors in parentheses * significant at 5%; ** significant at 1% . * the output is not very nice, though, because the columns are . * tab-delimited for inclusion in a word processor document . . search regression diagnostics [R] logistic . . . . . . . . . . . . . . . . . . . . . Logistic regression (help logistic, lfit, lstat, lroc, lsens) [R] predict . . . . Obtain predictions, residuals, etc., after estimation (help predict) [R] regression diagnostics . . . . . . . . . . . . Regression diagnostics (help regdiag, avplot, cprplot, lvr2plot, rvfplot, rvpplot, cont.) [R] regression diagnostics, continued from above (help ovtest, hettest, dwstat, dfbeta, vif) STB-2 srd3 . . . . . . . . . . . One-step Welsch bounded-influence estimator (help bound if installed) . . . . . . . . . . . . . . . R. Goldstein 7/91 STB Reprints Vol 1, page 176 ols regression output presented, regression diagnostics computed, dffits is used to weight the data and estimate a one-step Welsch bounded-influence regression http://www.komkon.org/~tacik/stata/ . . . . . . . . . . . . . . . Atkinson plot (help atkplot) . . . . . . . . . . . . . . . . . . . . . S. Kolenikov The plot of Box-Cox score test vs added observations suggested by Atkinson & Riani (2000) . hettest Cook-Weisberg test for heteroskedasticity using fitted values of price Ho: Constant variance chi2(1) = 6.34 Prob > chi2 = 0.0118 . ovtest Ramsey RESET test using powers of the fitted values of price Ho: model has no omitted variables F(3, 67) = 15.31 Prob > F = 0.0000 . predict res, res . label variable res "Residuals from main regression" . sktest res Skewness/Kurtosis tests for Normality ------- joint ------ Variable | Pr(Skewness) Pr(Kurtosis) adj chi2(2) Prob>chi2 -------------+------------------------------------------------------- res | 0.000 0.042 14.51 0.0007 . * now, some graphics . rvfplot, saving(gr1) . * residual versus fitted plot: some nonlinearity? . * can be visualised with a non-parametric smoother . rvfplot, connect(s) bands(10) saving(gr2) . * zero line . rvfplot, yline(0) saving(gr3) . * historgram of the residuals . graph res, bin(20) normal saving(gr4) . graph using gr1 gr2 gr3 gr4, margin(3) saving(grall) . translator set Graph2eps mag 150 . translator set Graph2eps orientation landscape . translate @Graph grall.eps, translator(Graph2eps) replace (note: file grall.eps not found) (file grall.eps written in .eps format) . regress price mpg wei for, robust Regression with robust standard errors Number of obs = 74 F( 3, 70) = 15.23 Prob > F = 0.0000 R-squared = 0.4996 Root MSE = 2130.8 ------------------------------------------------------------------------------ | Robust price | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- mpg | 21.8536 80.74674 0.27 0.787 -139.1907 182.8979 weight | 3.464706 .7776165 4.46 0.000 1.913799 5.015613 foreign | 3673.06 664.9361 5.52 0.000 2346.887 4999.234 _cons | -5853.696 3873.723 -1.51 0.135 -13579.59 1872.2 ------------------------------------------------------------------------------ . exit, clear