在哪里可以找到stata&x27的钥匙;s寄存器输出?

在哪里可以找到stata&x27的钥匙;s寄存器输出?,stata,Stata,我通过reg y x在stata进行了回归,得到了这个结果 Source | SS df MS Number of obs = 10 -------------+------------------------------ F( 1, 8) = 19.35 Model | .158119449 1 .158119449 Prob &g

我通过
reg y x
在stata进行了回归,得到了这个结果

      Source |       SS       df       MS              Number of obs =      10
-------------+------------------------------           F(  1,     8) =   19.35
       Model |  .158119449     1  .158119449           Prob > F      =  0.0023
    Residual |  .065358209     8  .008169776           R-squared     =  0.7075
-------------+------------------------------           Adj R-squared =  0.6710
       Total |  .223477658     9  .024830851           Root MSE      =  .09039

------------------------------------------------------------------------------
           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           x |   .4183884   .0951025     4.40   0.002     .1990816    .6376952
       _cons |     3.2228   .2231597    14.44   0.000     2.708193    3.737407
------------------------------------------------------------------------------

我不知道像SS、df、MS和_-con这样的缩写词是什么意思。我在哪里可以找到这些缩写的键?我尝试了
help reg
,但没有成功。最初,我只是想得到回归线的y截距和斜率。

首先,您需要键入
帮助回归
,并在标题下查看保存的结果。您将看到如下所示:

regress saves the following in e():

Scalars        
  e(N)                number of observations
  e(mss)              model sum of squares
  e(df_m)             model degrees of freedom
  e(rss)              residual sum of squares
  e(df_r)             residual degrees of freedom

现在,如果您只对一个或两个数量感兴趣,请在运行模型后键入
ereturn list
,然后提取所需的元素:

例如:

. sysuse auto
(1978 Automobile Data)


. reg mpg price length

      Source |       SS       df       MS              Number of obs =      74
-------------+------------------------------           F(  2,    71) =   66.65
       Model |   1594.2534     2  797.126698           Prob > F      =  0.0000
    Residual |  849.206062    71  11.9606488           R-squared     =  0.6525
-------------+------------------------------           Adj R-squared =  0.6427
       Total |  2443.45946    73  33.4720474           Root MSE      =  3.4584

------------------------------------------------------------------------------
         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       price |  -.0003013   .0001522    -1.98   0.052    -.0006047    2.10e-06
      length |  -.1895347    .020155    -9.40   0.000    -.2297226   -.1493468
       _cons |   58.77451   3.509998    16.74   0.000     51.77577    65.77325
------------------------------------------------------------------------------

. ereturn list

scalars:
                  e(N) =  74
               e(df_m) =  2
               e(df_r) =  71
                  e(F) =  66.64577432164889
                 e(r2) =  .6524574781898139
               e(rmse) =  3.458417089846885
                e(mss) =  1594.253396977965
                e(rss) =  849.2060624814947
               e(r2_a) =  .6426675479979778
                 e(ll) =  -195.2902121561856
               e(ll_0) =  -234.3943376482347
               e(rank) =  3

macros:
            e(cmdline) : "regress mpg price length"
              e(title) : "Linear regression"
          e(marginsok) : "XB default"
                e(vce) : "ols"
             e(depvar) : "mpg"
                e(cmd) : "regress"
         e(properties) : "b V"
            e(predict) : "regres_p"
              e(model) : "ols"
          e(estat_cmd) : "regress_estat"

matrices:
                  e(b) :  1 x 3
                  e(V) :  3 x 3

functions:
             e(sample)  
你说你想要一个常数和斜率。然后您可以在Stata中使用Mata:

 matrix list e(b)

e(b)[1,3]
         price      length       _cons
y1  -.00030128  -.18953472   58.774508

\u cons
是拦截的术语。另一个系数是斜率。所以你的方程是y=3.2228+0.4183884x。其他一切都是标准统计;如果您不熟悉它,您需要在您的级别上对回归进行说明,但除了您没有发现有用的帮助之外,还有手动输入。要在@NickCox:Stata上展开一点,它通常有两个地方记录其程序:帮助文件(键入
帮助回归
)和手册(以前是一大套书籍,但现在也可以作为一组pdf文件提供)。前者是那些只需要刷新记忆的人的快速参考,后者更详细。帮助文件通常以指向手册中相应条目的链接开始,因此这可能是最简单的查找方法。