楼主: hq-rainbow
64171 32

关于Heckman两阶段模型的估计 [推广有奖]

11
lcat0718 发表于 2010-12-18 21:46:10
Heckman两阶段估计可以在计量经济学导论,伍德里奇,17章第5节中找到
已有 2 人评分学术水平 热心指数 信用等级 收起 理由
smartpigeon + 1 + 1 + 1 热心帮助其他会员
静羽 + 1 THX

总评分: 学术水平 + 1  热心指数 + 2  信用等级 + 1   查看全部评分

12
armixu 发表于 2011-1-22 23:38:13
Eviews程序里自带的案例程序代码“heckman1.prg ”

' Heckman selection model with three regressors z1, z2, z3
' (common to both selection and regression equations)
' selection equation: lfp=1 if selected; otherwise 0
' regression model: lw (dependent) c z1 z2 z3 (regressors)
'
' for a discussion, see Section 20.4 of Greene, William H. (1997)
' Econometric Analysis, 3rd edition, Prentice-Hall

'change path to program path
%path = @runpath
cd %path
' load artificial data
load mlogit

' get starting values from 2-step Heckman
' first step: estimate probit of the selection equation
smpl @all
equation eq1.binary(d=n) lfp c z1 z2 z3
' copy starting values to selection equation params
coef(4) b = [email=eq1.@coefs]eq1.@coefs[/email]
' true values b(1) 1 b(2) 0.2 b(3) 0.5 b(4) -0.3
' compute inverse mills ratio
eq1.fit(i) xbhat
series imills = @dnorm(xbhat)/@cnorm(xbhat)
' compute delta to estimate sig2 (variance)
series delta = imills*(imills+xbhat)
' run second step OLS, including the inverse mills ratio
smpl @all if lfp=1
equation eq2.ls lw c z1 z2 z3 imills
' true values c(1) 5 c(2) 0.8 c(3) 0.1 c(4) -1
' construct estimate of correlation rho (note: uses only estimation sample of 2nd step)
eq2.makeresid resid2
' initial estimate of the regression model variance
coef(1) sig2 = @sumsq(resid2)/eq2.@regobs+@mean(delta)*eq2.c(5)^2
' true value 4
' initial estimate of the squared correlation between the two equations
' rho2 should be constrained between 0 and 1
coef(1) rho2 = eq2.c(5)^2/sig2(1)
' true value 0.64
' end of 2 step Heckman

13
faunar 发表于 2011-3-19 17:28:43
顶。工具变量不好选。

14
jwl20082007 发表于 2011-3-23 21:45:00
非常好看看  呵呵

15
gongxiaobo2006 发表于 2011-3-28 20:18:59
对于这两阶段,始终是理解的不透彻
我是吉林大学商学院数经的,Q564778089
人人id 290226950

16
lavendercao 发表于 2011-8-13 15:55:29
高手在哪里啊?

17
芜华 发表于 2012-4-9 10:56:42
都没人回答啊。

18
苹木 发表于 2012-10-22 13:54:20
回去看看书

19
wzw03 发表于 2012-10-26 21:43:55
qiangli 发表于 2006-8-2 20:53
eviews不行,stata有heckman的命令
请问Stata中的heckman专门的命令是什么啊?谢谢

20
shie 发表于 2012-11-24 17:27:40
lcat0718 发表于 2010-12-18 21:46
Heckman两阶段估计可以在计量经济学导论,伍德里奇,17章第5节中找到
发现我的书居然从16章直接跳到19章

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-25 19:19