全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
6010 4
2011-06-20
请问如果分年回归,需要报告每年的回归系数、t值、p值及R2。用这个命令:statsby _b _se,by(year): reg income workertype, 如何添加报告p值及R2?谢谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2011-6-20 20:28:34
帮助文件里已经说了!
所以请您详读:
exp_list specifies the statistics to be collected from the execution of command.  The expressions in
    exp_list follow the grammar given in exp_list.  If no expressions are given, exp_list assumes a default
    depending upon whether command changes results in e() and r().  If command changes results in e(), the
    default is _b.  If command changes results in r() (but not e()), the default is all the scalars posted to
    r().  It is an error not to specify an expression in exp_list otherwise.

结论
statsby _b _se e(r2),by(year): reg income workertype

至于p值,我也不太清处,请高手们补充!
不过您应该可以自行算出。
二维码

扫码加我 拉你入群

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

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

2011-6-20 21:43:24
h3327156 ,谢谢!
二维码

扫码加我 拉你入群

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

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

2011-6-21 06:25:34
sharlagao 发表于 2011-6-20 19:49 请问如果分年回归,需要报告每年的回归系数、t值、p值及R2。用这个命令:statsby _b _se,by(year): reg income workertype, 如何添加报告p值及R2?
*仅楼主的例子:

statsby _b tb=_b[workertype]/_se[workertype]  tc=_b[_con]/_se[_con]    ///
  pb=(2*ttail(e(N)-e(df_m)-1, abs(_b[workertype]/_se[workertype])))         ///
  pc=(2*ttail(e(N)-e(df_m)-1, abs(_b[_con]/_se[_con]))) e(r2) e(r2_a), by(year): reg income workertype
二维码

扫码加我 拉你入群

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

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

2011-6-21 20:23:31
谢谢sungmoo!
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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