大家有用过Heckman-IV的吗,在设计lambda的时候,识别变量选用了两个,有一个变量用了插补,dprobit咋就跑不出结果来了哇,是识别变量不能插补吗?还是有别的问题,命令如下:
/*识别变量*/
*************家庭成员数量*************
gen familynum = q101a1 + q101a2 + q101a3 + q101a4 + q101a5 + q101a6 + q101a7 + q101a8
tab familynum,m
***********流动原因(工作=1/其他=0)*****
tab q101l2,m
ren q101l2 migra_mot
recode migra_mot (1/2=2) (3/7=1) ,gen(mig_mot)
label values mig_mot "流动动因"
label define mig_mot 1 "其他" 2 "工作"
label values mig_mot "流动动因"
tab mig_mot,m
gen mig_work=(mig_mot-1) //构造01变量,"流动动因-工作"=1("其他"=0)
tab mig_work,m
/**插补流动动因(性别、年龄、户籍)**/
by female age edu urban, sort: egen ave_mig_work = mean(mig_work) // Group mean
replace mig_work = round(ave_mig_work) if missing(mig_work) //round意为四舍五入
tab mig_work,m
/*样本选择性偏差的处理*/
/*预测主体是否参加工作*/
gen labour=0 if income==.
replace labour=1 if labour==.
dprobit labour mig_work familynum
predict zg if e(example),xb
g lambda=normalden(zg)/normal(zg)
最后stata的结果显示如下:
note: mig_work != 1 predicts success perfectly
mig_work dropped and 1212 obs not used
note: familynum != 1 predicts success perfectly
familynum dropped and 5582 obs not used
Iteration 0: log likelihood = -10.008041
Probit regression, reporting marginal effects Number of obs = 8169
LR chi2(0) = 0.00
Prob > chi2 = .
Log likelihood = -10.008041 Pseudo R2 = 0.0000
------------------------------------------------------------------------------
labour | dF/dx Std. Err. z P>|z| x-bar [ 95% C.I. ]
---------+--------------------------------------------------------------------
---------+--------------------------------------------------------------------
obs. P | .9998776
pred. P | .9998776 (at x-bar)
------------------------------------------------------------------------------
z and P>|z| correspond to the test of the underlying coefficient being 0 matrix
__00000H not found
r(111);
报错“ matrix
__00000H not found”
是怎么回事啊==================
三年的数据变量设置都是一样的,方法也是一样的,其他两年都没有问题,11年的就这样报错了,有哪位大神帮忙指点一下哇,不胜感激!!!


雷达卡



京公网安备 11010802022788号







