Hello everyone,
I would like to a question, what does parentheses do in stata reg command?Why I get the different results, for example,
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
sysuse auto.dta,clear
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
------------------------------------------------------------------------------
I can't find how to use () in reg command in the help documentation, or maybe I can not find the right keywords. Thank you in advance!
I would like to a question, what does parentheses do in stata reg command?Why I get the different results, for example,
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
sysuse auto.dta,clear
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
------------------------------------------------------------------------------
I can't find how to use () in reg command in the help documentation, or maybe I can not find the right keywords. Thank you in advance!

Comment