Fitting problem in Heckman selection
Posted: Sat Sep 20, 2014 4:39 am
When you try to get the forecasts from Heckit procedure, it generates an error:
This only happens when the selection equation includes a constant, so I believe the problem lies in the specification of index:
I_Y = (C(6)*C + C(7)*WA + C(8)*WA^2 + C(9)*FAMINC + C(10)*WE + C(11)*(K618+KL6)>0)
Also, the expected dependent variable equation reads:
WW = I_Y*( C(1) + C(2)*AX + C(3)*AX^2 + C(4)*WE + C(5)*CIT + C(13)*C(12)*@DNORM(I_Y)/@CNORM(I_Y))
I believe c(12) and c(13) should be transformed back to sigma and rho. The output already prints the transformed values, but these are not stored in the coefficient vector (i.e. no c(14) and c(15)).
According to the output @atan(rho)*2/pi = c(13), but actually @atan(c(13))*2/@acos(-1) = rho. This is because c(13) denotes rho*, not the rho itself. I think it would be useful to make this distinction more explicit or simply replace @atan(rho)*2/pi with @tan(rho*pi/2).
Code: Select all
wfopen http://www.stern.nyu.edu/~wgreene/Text/Edition7/TableF5-1.txt
equation eq01.heckit ww c ax ax^2 we cit @ lfp c wa wa^2 faminc we (k618+kl6)>0
eq01.fit wwf
eq01.fit(i) indexI_Y = (C(6)*C + C(7)*WA + C(8)*WA^2 + C(9)*FAMINC + C(10)*WE + C(11)*(K618+KL6)>0)
Also, the expected dependent variable equation reads:
WW = I_Y*( C(1) + C(2)*AX + C(3)*AX^2 + C(4)*WE + C(5)*CIT + C(13)*C(12)*@DNORM(I_Y)/@CNORM(I_Y))
I believe c(12) and c(13) should be transformed back to sigma and rho. The output already prints the transformed values, but these are not stored in the coefficient vector (i.e. no c(14) and c(15)).
According to the output @atan(rho)*2/pi = c(13), but actually @atan(c(13))*2/@acos(-1) = rho. This is because c(13) denotes rho*, not the rho itself. I think it would be useful to make this distinction more explicit or simply replace @atan(rho)*2/pi with @tan(rho*pi/2).