全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
3048 9
2013-05-25
悬赏 1500 个论坛币 已解决
在treatment effect的第一个stage是probit,然后得到IMR
第二个stage看到的都是OLS,然后把第一个stage得到的IMR放入第二个stage.

问题:第二个stage可以是probit或者negative binomial 吗? 如果可以,是不是也是把IMR直接放入到第二个stage?

非常感谢!



最佳答案

蓝色 查看完整内容

理论上是可以的 maddal的书上就有例子 程序估计需要自己编写。 或许你看看 cmp 命令 https://bbs.pinggu.org/thread-927406-1-1.html 这里原来讨论过相关的 Maximum likelihood estimation of endogenous switching and sample selection models for binary, ordinal, and count variables
二维码

扫码加我 拉你入群

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

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

全部回复
2013-5-25 00:33:15
理论上是可以的
maddal的书上就有例子

程序估计需要自己编写。
或许你看看
cmp  命令


https://bbs.pinggu.org/thread-927406-1-1.html
这里原来讨论过相关的


Maximum likelihood estimation of endogenous switching and sample selection models for binary, ordinal, and count variables

二维码

扫码加我 拉你入群

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

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

2013-5-27 16:33:14
有直接可以用的stata程序吗?many thanks!
二维码

扫码加我 拉你入群

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

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

2013-5-28 20:32:03
蓝色 发表于 2013-5-25 11:22
理论上是可以的
maddal的书上就有例子
maddal的哪本书啊?maddal 一个印度的统计学家?
二维码

扫码加我 拉你入群

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

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

2013-5-28 22:25:56
G. S. Maddala, Limited Dependent and Qualitative Variables in Econometrics
二维码

扫码加我 拉你入群

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

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

2013-5-29 15:08:06
蓝色 发表于 2013-5-25 11:22
理论上是可以的
maddal的书上就有例子
我读了Maximum likelihood estimation of endogenous switching and sample selection models for binary, ordinal, and count variables.pdf, 觉得里面的ssm就是能解决我的问题的命令. 但是很奇怪的是不论是他paper里面的还是help文件的simulated examples,运行后都有出错信息.

paper里面的simulated example:
clear
set seed 12345678
set obs 3500
local lambda=0.4
gen double ve=invnormal(uniform())
gen double zeta=invnormal(uniform())
gen double tau=invnormal(uniform())
gen double x1=invnormal(uniform())
gen double x2=invnormal(uniform())
gen double x3=invnormal(uniform())
gen double x4=invnormal(uniform())
replace x3=(x3>0)
replace x4=(x4>0)
gen double selstar=0.58+0.93*x1+0.45*x2-0.64*x3+0.6*x4+(ve+zeta)/sqrt(2)
gen sel=(selstar>0)
gen double ystar=0.17+0.30*x1+0.11*x2+(`lambda'*ve+tau)/sqrt(1+`lambda'^2)
gen y=(ystar>0)
replace y=. if sel==0

*heckprob y x1 x2, select(sel=x1 x2 x3 x4)
ssm y x1 x2, s(sel=x1 x2 x3 x4) q(16) family(binom) link(probit) sel adapt

出错信息是:

(error occurred in ML computation)
(use trace option and check correctness of initial model)
equation id1_1l not found


help里面的simulated example:

clear
    set seed 12345678
    set obs 3500
    local lambda = 0.4
    gen double ve = invnorm(uniform())
    gen double zeta = invnorm(uniform())
    gen double tau = invnorm(uniform())
    gen double x1=invnorm(uniform())
    gen double x2=invnorm(uniform())
    gen double x3=invnorm(uniform())
    gen double x4=invnorm(uniform())
    gen selstar = 0.58 + 0.93*x1 + 0.45*x2 - 0.64*x3 + 0.6*x4 + (ve +  ///
        zeta)/sqrt(2)
    gen double sel = (selstar>0)
    gen double ystar = 0.30*x1 + 0.11*x2 + (`lambda'*ve +  ///
        tau)/sqrt(1+`lambda'^2)
    gen double ordvar = 0
    qui replace ordvar=1 if ystar>-0.40 & ystar<=0.17
    qui replace ordvar=2 if ystar>0.17 & ystar<=0.45
    qui replace ordvar=3 if ystar>0.45 & ystar<=0.80
    qui replace ordvar=4 if ystar>0.80 & ystar<=1.25
    qui replace ordvar=5 if ystar>1.25
    replace ordvar=. if sel==0


ssm y x1 x2, s(sel = x1 x2 x3 x4) q(15) fam(bin) link(probit) sel
出错信息是:

r(2000);


我到底什么地方弄错了,实在非常感谢!!!

二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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