没有问题的啊
. clear
. sysuse auto
(1978 Automobile Data)
. xi: reg price mpg rep78 i.trunk
i.trunk _Itrunk_5-23 (naturally coded; _Itrunk_5 omitted)
Source | SS df MS Number of obs = 69
-------------+------------------------------ F( 19, 49) = 1.82
Model | 238783410 19 12567547.9 Prob > F = 0.0471
Residual | 338013549 49 6898235.7 R-squared = 0.4140
-------------+------------------------------ Adj R-squared = 0.1868
Total | 576796959 68 8482308.22 Root MSE = 2626.4
------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mpg | -202.7317 79.38407 -2.55 0.014 -362.26 -43.20344
rep78 | 296.2135 479.9423 0.62 0.540 -668.2667 1260.694
_Itrunk_6 | 716.3415 3735.508 0.19 0.849 -6790.442 8223.125
_Itrunk_7 | -766.5588 3210.708 -0.24 0.812 -7218.718 5685.601
_Itrunk_8 | 696.7774 2947.637 0.24 0.814 -5226.72 6620.275
_Itrunk_9 | -784.1158 2936.728 -0.27 0.791 -6685.691 5117.459
_Itrunk_10 | -494.7133 2974.603 -0.17 0.869 -6472.402 5482.976
_Itrunk_11 | -176.9032 2790.26 -0.06 0.950 -5784.141 5430.334
_Itrunk_12 | 3127.573 3232.365 0.97 0.338 -3368.107 9623.254
_Itrunk_13 | 2088.783 3105.705 0.67 0.504 -4152.365 8329.93
_Itrunk_14 | 733.2785 3153.016 0.23 0.817 -5602.945 7069.502
_Itrunk_15 | 2040.542 2904.381 0.70 0.486 -3796.03 7877.113
_Itrunk_16 | -109.3881 2828.108 -0.04 0.969 -5792.683 5573.907
_Itrunk_17 | 1.556555 2886.795 0.00 1.000 -5799.675 5802.788
_Itrunk_18 | 6147.506 3900.932 1.58 0.121 -1691.709 13986.72
_Itrunk_20 | 723.4869 2961.151 0.24 0.808 -5227.168 6674.142
_Itrunk_21 | -118.3626 3338.292 -0.04 0.972 -6826.912 6590.187
_Itrunk_22 | 4050.506 3900.932 1.04 0.304 -3788.709 11889.72
_Itrunk_23 | -673.2986 3840.35 -0.18 0.862 -8390.77 7044.173
_cons | 8990.634 3544.668 2.54 0.014 1867.357 16113.91
------------------------------------------------------------------------------
. outreg using d:\result.txt,replace
. *type d:\result.txt
. view d:\result.txt
.
end of do-file
. type d:\result.txt
Price
Mileage (mpg) -202.732
(2.55)*
Repair Record 1978 296.213
(0.62)
trunk==6 716.342
(0.19)
trunk==7 -766.559
(0.24)
trunk==8 696.777
(0.24)
trunk==9 -784.116
(0.27)
trunk==10 -494.713
(0.17)
trunk==11 -176.903
(0.06)
trunk==12 3,127.573
(0.97)
trunk==13 2,088.783
(0.67)
trunk==14 733.279
(0.23)
trunk==15 2,040.542
(0.70)
trunk==16 -109.388
(0.04)
trunk==17 1.557
(0.00)
trunk==18 6,147.506
(1.58)
trunk==20 723.487
(0.24)
trunk==21 -118.363
(0.04)
trunk==22 4,050.506
(1.04)
trunk==23 -673.299
(0.18)
Constant 8,990.634
(2.54)*
Observations 69
R-squared 0.41
Absolute value of t statistics in parentheses
* significant at 5%; ** significant at 1%