想请问大家,在reg命令中括号的()作用是什么呢?我在复现外文code的过程中遇到reg命令中加了括号,但是我在帮助文档中查不到该()的使用和含义,可能是我没找对方法。举个例子
- sysuse auto.dta,clear
- reg mpg price ( length rep78 )
复制代码- Instrumental variables 2SLS regression
- Source | SS df MS Number of obs = 69
- -------------+---------------------------------- F(1, 67) = 18.09
- Model | -1913.95631 1 -1913.95631 Prob > F = 0.0001
- Residual | 4254.15921 67 63.4949136 R-squared = .
- -------------+---------------------------------- Adj R-squared = .
- Total | 2340.2029 68 34.4147485 Root MSE = 7.9684
- ------------------------------------------------------------------------------
- mpg | Coefficient Std. err. t P>|t| [95% conf. interval]
- -------------+----------------------------------------------------------------
- price | -.0029584 .0006956 -4.25 0.000 -.0043469 -.0015699
- _cons | 39.47247 4.381782 9.01 0.000 30.72639 48.21854
- 如果直接回归,结果是这样的,两者为什么会有区别呢?谢谢啊
- . reg mpg price length rep78
- Source | SS df MS Number of obs = 69
- -------------+---------------------------------- F(3, 65) = 45.97
- Model | 1590.58264 3 530.194215 Prob > F = 0.0000
- Residual | 749.620255 65 11.5326193 R-squared = 0.6797
- -------------+---------------------------------- Adj R-squared = 0.6649
- Total | 2340.2029 68 34.4147485 Root MSE = 3.396
- ------------------------------------------------------------------------------
- mpg | Coefficient Std. err. t P>|t| [95% conf. interval]
- -------------+----------------------------------------------------------------
- price | -.0003177 .0001609 -1.97 0.053 -.000639 3.60e-06
- length | -.1744347 .0220828 -7.90 0.000 -.2185371 -.1303322
- rep78 | .9451721 .4550727 2.08 0.042 .0363291 1.854015
- _cons | 52.86764 4.639999 11.39 0.000 43.60093 62.13436
- ------------------------------------------------------------------------------
复制代码