全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
14256 3
2009-08-06
遇到以下问题,请求老师帮忙解答。
1.我在做two-way fixed effect model,想同时设置country pair和time两个固定效应,请问这个在stata中如何实现?
2.我在网上学习到的x2reg.do命令可以做这个,但是我下载后的文件拷入C:\Program Files\Stata9\ado\plus\a,之后不能做?听说stata可以拷入外部命令,只是自己之前没做过,不知道问题出在哪里?
3.为了解决因变量取“0”值的问题,我需要用tobit model,但是不知道这个能否同时做以上panel data的固定效应模型?不知道在stata中如何实现?

孙林
二维码

扫码加我 拉你入群

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

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

全部回复
2009-8-6 19:48:25
遇到以下问题,请求老师帮忙解答。
1.我在做two-way fixed effect model,想同时设置country pair和time两个固定效应,请问这个在stata中如何实现?

由于country effect与固定效应共线性,所以你的模型中无法加入country effect。时间效应的设定 B7_Panel_01FERE中有详细讲解。具体操作如下:
   qui tab year, gen(dumt)
      drop dumt1
      xtreg y x dumt*, fe



2.我在网上学习到的x2reg.do命令可以做这个,但是我下载(下载地址:http://ideas.repec.org/c/boc/bocode/s456942.html)后的文件拷入我电脑中C:\Program Files\Stata9\ado\plus\a,之后help-stata command中不能检索到?听说stata可以拷入外部命令,只是自己之前没做过,不知道问题出在哪里?(从网上下载的*.do和*.hlp文件,该如何使用,请老师指点一下步骤。)

[smile] 你说的是 -a2reg- 命令。下载方法如下:
      (1)假设你的stata安装在 D:\stata10 下,则为了让stata知道你的外部命令的存放地址,请设定:
                sysdir set PLUS "D:\stata10\ado\plus"
      (2)执行如下命令,可自动安装 -a2reg- 命令到 \plus\a 文件夹下:
                ssc install a2reg, replace

       更为根本的解决方法是,参照“stata高级视频教程简介”中“课程配套资料使用方法”的说明,讲 profile.do 文件放在指定位置。



3.为了解决因变量取“0”值的问题(left-censored regression model),我需要用tobit model,但是不知道这个能否同时做以上panel data的固定效应模型?不知道在stata中如何实现?我看到xttobit可以做random effect model,但是并没有做固定效应模型的介绍,请老师指点迷津。

[smile] 目前stata中还没有估计FE tobit的命令,存在技术上的困难,手册中的解释如下:
xttobit fits a random-effects tobit models.  There is no command for a
    conditional fixed-effects model, as there does not exist a sufficient
    statistic allowing the fixed effects to be conditioned out of the
    likelihood.  Honore has developed a semiparametric estimator for
    fixed-effect tobit models.  Unconditional fixed-effects tobit models may
    be fit with tobit command with indicator variables for the panels.  The
    appropriate indicator variables can be generated using tabulate or xi.
    However, unconditional fixed-effects estimates are biased.

下面的连接可供参考:
   http://www.stata.com/statalist/archive/2004-12/msg00462.html
二维码

扫码加我 拉你入群

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

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

2009-10-13 21:54:33
好问题
谢谢
二维码

扫码加我 拉你入群

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

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

2009-10-13 21:57:19
好问题
谢谢横额合计
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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