___ ____ ____ ____ ____ (R) /__ / ____/ / ____/ ___/ / /___/ / /___/ 15.1 Copyright 1985-2017 StataCorp LLC Statistics/Data Analysis StataCorp 4905 Lakeway Drive Special Edition College Station, Texas 77845 USA 800-STATA-PC http://www.stata.com 979-696-4600 stata@stata.com 979-696-4601 (fax) Single-user Stata perpetual license: Serial number: 15 Licensed to: Kreshna Gopal StataCorp LLC Notes: 1. Stata is running in batch mode. 2. Unicode is supported; see help unicode_advice. 3. Maximum number of variables is set to 5000; see help set_maxvar. running /home/krg/bin/profile.do ... Compile number 629 . do noint2.do . /* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/ > > Linear Regression > > Difficulty=Average Linear k=1 N=3 Generated > > Dataset Name: Line Through Origin-2 (nointercept2.dat) > > Procedure: Linear Least Squares Regression > > Reference: Eberhardt, K., NIST. > > Data: 1 Response Variable (y) > 1 Predictor Variable (x) > 3 Observations > Average Level of Difficulty > Generated Data > > Model: Linear Class > 1 Parameter (B1) > > y = B1*x + e > > > Certified Regression Statistics > > Standard Deviation > Parameter Estimate of Estimate > > B1 0.727272727272727 0.420827318078432E-01 > > Residual > Standard Deviation 0.369274472937998 > > R-Squared 0.993348115299335 > > > Certified Analysis of Variance Table > > Source of Degrees of Sums of Mean > Variation Freedom Squares Squares F Statistic > > Regression 1 40.7272727272727 40.7272727272727 298.6666666666667 > Residual 2 0.272727272727273 0.136363636363636 > */ . . clear . . scalar N = 3 . scalar df_r = 2 . scalar df_m = 1 . . scalar rmse = 0.369274472937998 . scalar r2 = 0.993348115299335 . scalar mss = 40.7272727272727 . scalar F = 298.6666666666667 . scalar rss = 0.272727272727273 . . scalar bx = 0.727272727272727 . scalar sex = 0.420827318078432E-01 . . qui input int (y x) . . reg y x, nocons Source | SS df MS Number of obs = 3 -------------+---------------------------------- F(1, 2) = 298.67 Model | 40.7272727 1 40.7272727 Prob > F = 0.0033 Residual | .272727273 2 .136363636 R-squared = 0.9933 -------------+---------------------------------- Adj R-squared = 0.9900 Total | 41 3 13.6666667 Root MSE = .36927 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .7272727 .0420827 17.28 0.003 .5462053 .9083401 ------------------------------------------------------------------------------ . di "R-squared = " %20.15f e(r2) R-squared = 0.993348115299335 . . assert N == e(N) . assert df_r == e(df_r) . assert df_m == e(df_m) . . lrecomp _b[x] bx () _se[x] sex () /* > */ e(rmse) rmse e(r2) r2 e(mss) mss e(F) F e(rss) rss _b[x] 15.2 ------------------------- min 15.2 _se[x] 15.2 ------------------------- min 15.2 e(rmse) 15.8 e(r2) 16.0 e(mss) 15.2 e(F) 15.1 e(rss) 14.7 . end of do-file