楼主: yscfrank
19726 4

[回归分析求助] predict yhat 这个命令不懂,求助 [推广有奖]

  • 6关注
  • 1粉丝

已卖:1份资源

硕士生

97%

还不是VIP/贵宾

-

威望
0
论坛币
2918 个
通用积分
1.3458
学术水平
5 点
热心指数
0 点
信用等级
0 点
经验
7154 点
帖子
205
精华
0
在线时间
126 小时
注册时间
2015-11-21
最后登录
2023-6-22

楼主
yscfrank 学生认证  发表于 2018-3-8 14:21:08 |AI写论文
10论坛币
predict yhat  这个命令不懂,求助  和 predict yhat,xb有什么区别

最佳答案

蓝色 查看完整内容

没有区别。 你需要把基础的stata、计量经济学和stata结合的书系统的先看完一遍
关键词:predict Pred ICT edi dic

沙发
蓝色 发表于 2018-3-8 14:21:09
没有区别。

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

藤椅
yscfrank 学生认证  发表于 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.






报纸
yscfrank 学生认证  发表于 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,出来的是红色的字体。第一个和第二个望解答大神。第三个会更好。特别着急,在写论文,写到现在方法遇到瓶颈了,万分感谢。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-1 14:07