. use auto_zh, clear
(1978年汽车数据)
. scatter 油耗 重量, mcolor(blue%50)
. regress 油耗 重量
Source | SS df MS Number of obs = 74
-------------+---------------------------------- F(1, 72) = 194.71
Model | 87.2964971 1 87.2964971 Prob > F = 0.0000
Residual | 32.2797637 72 .448330051 R-squared = 0.7300
-------------+---------------------------------- Adj R-squared = 0.7263
Total | 119.576261 73 1.63803097 Root MSE = .66957
------------------------------------------------------------------------------
油耗 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
重量 | .003102 .0002223 13.95 0.000 .0026589 .0035452
_cons | .7707669 .3142571 2.45 0.017 .1443069 1.397227
------------------------------------------------------------------------------
线性回归结果显示重量每增加一百公斤,每百公里油耗增加 0.3102公升。