___ ____ ____ ____ ____ ® /__ / ____/ / ____/ 18.0 ___/ / /___/ / /___/ SE—Standard Edition Statistics and Data Science Copyright 1985-2023 StataCorp LLC StataCorp 4905 Lakeway Drive College Station, Texas 77845 USA 800-STATA-PC https://www.stata.com 979-696-4600 stata@stata.com Stata license: 10-user network perpetual Serial number: 1 Licensed to: Stata Developer 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 5,000 but can be increased; see help set_maxvar. Running /home/krg/bin/profile.do ... Compile number 180110 . do noint1.do . /* NIST/ITL StRD > > Linear Regression > > Difficulty=Average Linear k=1 N=11 Generated > > Dataset Name: Line Through Origin-1 (nointercept1.dat) > > Procedure: Linear Least Squares Regression > > Reference: Eberhardt, K., NIST. > > Data: 1 Response Variable (y) > 1 Predictor Variable (x) > 11 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 2.07438016528926 0.165289256198347E-01 > > Residual > Standard Deviation 3.56753034006338 > > R-Squared 0.999365492298663 > > Certified Analysis of Variance Table > > Source of Degrees of Sums of Mean > Variation Freedom Squares Squares F Statistic > > Regression 1 200457.727272727 200457.727272727 15750.2500000000 > Residual 10 127.272727272727 12.7272727272727 > */ . . clear . . scalar N = 11 . scalar df_r = 10 . scalar df_m = 1 . . scalar rmse = 3.56753034006338 . scalar r2 = 0.999365492298663 . scalar mss = 200457.727272727 . scalar F = 15750.2500000000 . scalar rss = 127.272727272727 . . scalar bx = 2.07438016528926 . scalar sex = 0.165289256198347E-01 . . qui input int (y x) . . reg y x, nocons Source | SS df MS Number of obs = 11 -------------+---------------------------------- F(1, 10) = 15750.25 Model | 200457.727 1 200457.727 Prob > F = 0.0000 Residual | 127.272727 10 12.7272727 R-squared = 0.9994 -------------+---------------------------------- Adj R-squared = 0.9993 Total | 200585 11 18235 Root MSE = 3.5675 ------------------------------------------------------------------------------ y | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- x | 2.07438 .0165289 125.50 0.000 2.037551 2.111209 ------------------------------------------------------------------------------ . di "R-squared = " %20.15f e(r2) R-squared = 0.999365492298663 . . 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] 14.7 ------------------------- min 14.7 _se[x] 15.7 ------------------------- min 15.7 e(rmse) 15.1 e(r2) 15.7 e(mss) 14.9 e(F) 15.1 e(rss) 14.9 . . end of do-file