全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
19511 4
2018-03-08
悬赏 10 个论坛币 已解决
predict yhat  这个命令不懂,求助  和 predict yhat,xb有什么区别

最佳答案

蓝色 查看完整内容

没有区别。 你需要把基础的stata、计量经济学和stata结合的书系统的先看完一遍
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2018-3-8 14:21:09
没有区别。

你需要把基础的stata、计量经济学和stata结合的书系统的先看完一遍
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-3-9 15:48:21
蓝色 发表于 2018-3-8 15:12
没有区别。

你需要把基础的stata、计量经济学和stata结合的书系统的先看完一遍
我看了一下,但是我现在的问题是 probit回归以后,分别使用2个命令,predict yhat ,xb   和  predict yhat .2个命令得出的结果是不一样的
这怎么回事,而且 predict yhat  这个命令得到的预测值,效果特别好。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-3-9 20:07:23
yscfrank 发表于 2018-3-9 15:48
我看了一下,但是我现在的问题是 probit回归以后,分别使用2个命令,predict yhat ,xb   和  predict yha ...
probit
模型的是不一样,看帮助解释
Syntax for predict


        predict [type] newvar [if] [in] [, statistic nooffset rules asif]


    statistic             Description
    ---------------------------------------------------------------------------------------------------
    Main
      pr                  probability of a positive outcome; the default
      xb                  linear prediction
      stdp                standard error of the linear prediction
    * deviance            deviance residual
      score               first derivative of the log likelihood with respect to xb
    ---------------------------------------------------------------------------------------------------
    Unstarred statistics are available both in and out of sample; type predict ... if e(sample) ... if
      wanted only for the estimation sample.  Starred statistics are calculated only for the estimation
      sample, even when if e(sample) is not specified.




reg回归的是一样的
Predictions


Syntax for predict


        predict [type] newvar [if] [in] [, statistic]


    statistic            Description
    -------------------------------------------------------------------------------------------------
    Main
      xb                 linear prediction; the default
      residuals          residuals
      score              score; equivalent to residuals
      rstandard          standardized residuals
      rstudent           Studentized (jackknifed) residuals
      cooksd             Cook's distance
      leverage | hat     leverage (diagonal elements of hat matrix)
      pr(a,b)            Pr(y | a < y < b)
      e(a,b)             E(y | a < y < b)
      ystar(a,b)         E(y*), y* = max(a,min(y,b))
    * dfbeta(varname)    DFBETA for varname
      stdp               standard error of the linear prediction
      stdf               standard error of the forecast
      stdr               standard error of the residual
    * covratio           COVRATIO
    * dfits              DFITS
    * welsch             Welsch distance
    --------------------------------------------------------------------------------------------------
    Unstarred statistics are available both in and out of sample; type predict ... if e(sample) ... if
      wanted only for the estimation sample.  Starred statistics are calculated only for the estimation
      sample, even when if e(sample) is not specified.
    rstandard, rstudent, cooksd, leverage, dfbeta(), stdf, stdr, covratio, dfits, and welsch are not
      available if any vce() other than vce(ols) was specified with regress.
    xb, residuals, score, and stdp are the only options allowed with svy estimation results.


    where a and b may be numbers or variables; a missing (a > .) means minus infinity, and b missing (b >
      .) means plus infinity; see missing.






二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-3-9 21:03:21
蓝色 发表于 2018-3-9 20:07
probit
模型的是不一样,看帮助解释
Syntax for predict
三个问题。。第一个问题是   这个help 怎么调出来的?  我一直用的help predict 但是出来的却是第一个,你怎么会有2个help,不是同一命令么help predict ?另外第二个问题是   我是用的probit y1 x1 x2 x3  ,接着predict yhat,    然后再probit y2 x1 x2 x3  接着predict yhat2 。这样得出的2个yhat yhat2是2个回归的预测值?   问题三,这个模型的残差值怎么做,好像普通的不行,predict e,resid,出来的是红色的字体。第一个和第二个望解答大神。第三个会更好。特别着急,在写论文,写到现在方法遇到瓶颈了,万分感谢。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群