I am running a pooled panel Heckman two-step estimation to find determinants of insurance purchases. A signficant effect of the inverse mills ratio (imr1) below indicates a selection problem and that Heckman is preferred over OLS.
Code:
*1st stage probit model probit y_seen x18 i.x19 i.x20 round i.x3 x4 x5 x6 x7 i.x8 x9 i.x10##i.x11 i.x12 x13 x14 /// i.x15##c.x16 x17 [pweight=pweight], vce(cluster HHID) margins, dydx(*) post
Code:
Average marginal effects Number of obs = 574 Model VCE : Robust Expression : Pr(y_seen), predict() dy/dx w.r.t. : x18 1.x19 1.x20 round 1.x3 x4 x5 x6 x7 1.x8 x9 1.x10 1.x11 1.x12 x13 x14 1.x15 x16 x17 ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x18 | .0143955 .0015807 9.11 0.000 .0112974 .0174936 1.x19 | -.0449697 .0218515 -2.06 0.040 -.0877979 -.0021416 1.x20 | -.1017704 .0269623 -3.77 0.000 -.1546156 -.0489252 round | -.0479061 .0173747 -2.76 0.006 -.0819598 -.0138523 1.x3 | -.0209526 .0290927 -0.72 0.471 -.0779732 .0360681 x4 | .0000826 .0000152 5.43 0.000 .0000528 .0001124 x5 | .0042392 .0131803 0.32 0.748 -.0215938 .0300721 x6 | .0052349 .0060947 0.86 0.390 -.0067104 .0171802 x7 | .0043644 .0016943 2.58 0.010 .0010435 .0076852 1.x8 | -.0120274 .0366869 -0.33 0.743 -.0839324 .0598777 x9 | .0508862 .013231 3.85 0.000 .024954 .0768184 1.x10 | .0865615 .0383121 2.26 0.024 .0114712 .1616518 1.x11 | .010413 .0292698 0.36 0.722 -.0469548 .0677807 1.x12 | -.0040397 .0392662 -0.10 0.918 -.0810001 .0729207 x13 | -.0221218 .0120994 -1.83 0.067 -.0458363 .0015927 x14 | .0001126 .000437 0.26 0.797 -.000744 .0009691 1.x15 | -.0348978 .0388583 -0.90 0.369 -.1110588 .0412631 x16 | -.001754 .0004966 -3.53 0.000 -.0027274 -.0007806 x17 | .0290123 .0151913 1.91 0.056 -.000762 .0587867 ------------------------------------------------------------------------------ Note: dy/dx for factor levels is the discrete change from the base level.
Code:
qui probit y_seen x18 i.x19 i.x20 round i.x3 x4 x5 x6 x7 i.x8 x9 i.x10##i.x11 i.x12 x13 x14 /// i.x15##c.x16 x17 [pweight=pweight], vce(cluster HHID) predict p1, xb //calculates predicted value of \beta*X from selection regression replace p1=-p1 //calculates -Z_i\gamma generate phi = (1/sqrt(2*_pi))*exp(-(p1^2/2)) //normal distribution density function generate capphi = normal(p1) //cumulative density function generate imr1 = phi/(1-capphi) //calculates Inverse Mills ratio *2nd stage Heckman model: truncated and pooled OLS reg y x1 x2 round i.x3 x4 x5 x6 x7 i.x8 x9 i.x10##i.x11 i.x12 x13 x14 i.x15##c.x16 x17 imr1 /// [pweight=pweight], vce(cluster HHID)
Code:
Linear regression Number of obs = 472 F(21, 124) = 64.07 Prob > F = 0.0000 R-squared = 0.4332 Root MSE = .58905 (Std. Err. adjusted for 125 clusters in HHID) ------------------------------------------------------------------------------ | Robust y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | 1.086289 .0920832 11.80 0.000 .9040309 1.268548 x2 | -1.285324 1.143381 -1.12 0.263 -3.548395 .9777475 round | -.103336 .0590195 -1.75 0.082 -.2201521 .0134801 1.x3 | -.083443 .0714037 -1.17 0.245 -.224771 .057885 x4 | -.000065 .0000324 -2.00 0.047 -.0001292 -8.20e-07 x5 | -.0466427 .023452 -1.99 0.049 -.0930609 -.0002246 x6 | .0381533 .0112903 3.38 0.001 .0158066 .0605 x7 | .0170921 .0034209 5.00 0.000 .0103212 .023863 1.x8 | -.0287251 .0753869 -0.38 0.704 -.1779369 .1204868 x9 | -.0255863 .0329273 -0.78 0.439 -.0907586 .039586 1.x10 | -.1244701 .1442971 -0.86 0.390 -.4100745 .1611344 1.x11 | .0221183 .1491671 0.15 0.882 -.2731251 .3173617 | x10#x11 | 1 1 | .188353 .1639117 1.15 0.253 -.1360742 .5127803 | 1.x12 | .2493369 .069622 3.58 0.000 .1115354 .3871384 x13 | .0115066 .0247547 0.46 0.643 -.0374899 .0605032 x14 | .001514 .0008878 1.71 0.091 -.0002433 .0032712 1.x15 | .155291 .2137375 0.73 0.469 -.2677555 .5783375 x16 | -.004325 .0031301 -1.38 0.170 -.0105205 .0018704 | x15#c.x16 | 1 | .003758 .0035941 1.05 0.298 -.0033558 .0108718 | x17 | .0196864 .0373166 0.53 0.599 -.0541735 .0935464 imr1 | .2430458 .1113475 2.18 0.031 .0226579 .4634338 _cons | 13.41441 12.27384 1.09 0.277 -10.87896 37.70777 ------------------------------------------------------------------------------
(1) Is the selection equation only based on the truncated sample with y>0? Why? This does not make any sense as there is no variation in y!?
(2) Can this explain why the inverse mills ratio (selection effect) is here not significantly different from zero as indicated by the Wald test that cannot reject the null hypothesis of rho=0?
Code:
heckman y x1 x2 round i.x3 x4 x5 x6 x7 i.x8 x9 i.x10##i.x11 i.x12 x13 x14 i.x15##c.x16 x17 /// [pweight=pweight], /// select(y_seen=x18 i.x19 i.x20 round i.x3 x4 x5 x6 x7 i.x8 x9 i.x10##i.x11 i.x12 x13 x14 /// i.x15##c.x16 x17) vce(cluster HHID)
Code:
Heckman selection model Number of obs = 574 (regression model with sample selection) Selected = 472 Nonselected = 102 Wald chi2(20) = 1384.02 Log pseudolikelihood = -519.9681 Prob > chi2 = 0.0000 (Std. Err. adjusted for 126 clusters in HHID) ------------------------------------------------------------------------------ | Robust | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- y | x1 | 1.079878 .0870764 12.40 0.000 .9092117 1.250545 x2 | -1.146409 1.003011 -1.14 0.253 -3.112275 .8194557 round | -.1038978 .0547836 -1.90 0.058 -.2112717 .003476 1.x3 | -.0767749 .073642 -1.04 0.297 -.2211107 .0675608 x4 | -.0000586 .0000311 -1.89 0.059 -.0001196 2.31e-06 x5 | -.0532746 .0271382 -1.96 0.050 -.1064644 -.0000848 x6 | .0335714 .0143009 2.35 0.019 .0055421 .0616007 x7 | .0169975 .0032445 5.24 0.000 .0106384 .0233566 1.x8 | -.0426975 .0950499 -0.45 0.653 -.2289919 .143597 x9 | -.0154203 .0327672 -0.47 0.638 -.0796428 .0488022 1.x10 | -.0930904 .1506446 -0.62 0.537 -.3883484 .2021676 1.x11 | .0727406 .1849587 0.39 0.694 -.2897718 .4352531 | x10#x11 | 1 1 | .165025 .1665951 0.99 0.322 -.1614954 .4915454 | 1.x12 | .2292365 .0845575 2.71 0.007 .0635068 .3949662 x13 | -.0052651 .0451982 -0.12 0.907 -.093852 .0833218 x14 | .0015364 .0009399 1.63 0.102 -.0003058 .0033786 1.x15 | .1121501 .2073449 0.54 0.589 -.2942384 .5185386 x16 | -.0061802 .0047053 -1.31 0.189 -.0154025 .003042 | x15#c.x16 | 1 | .0056411 .0053074 1.06 0.288 -.0047612 .0160434 | x17 | .0331053 .0396846 0.83 0.404 -.0446752 .1108857 _cons | 11.9172 10.75137 1.11 0.268 -9.155095 32.9895 -------------+---------------------------------------------------------------- y_seen | x18 | .0954856 .023458 4.07 0.000 .0495088 .1414624 1.x19 | -.4510818 .1957512 -2.30 0.021 -.834747 -.0674166 1.x20 | -.5628401 .4688995 -1.20 0.230 -1.481866 .356186 round | -.3500378 .1178559 -2.97 0.003 -.5810312 -.1190445 1.x3 | -.0514181 .2962523 -0.17 0.862 -.6320619 .5292257 x4 | .0006573 .0001697 3.87 0.000 .0003247 .0009898 x5 | -.0264533 .1181423 -0.22 0.823 -.2580079 .2051012 x6 | .0606577 .0973045 0.62 0.533 -.1300557 .251371 x7 | .0344755 .012954 2.66 0.008 .0090862 .0598649 1.x8 | -.1359341 .3216742 -0.42 0.673 -.766404 .4945357 x9 | .4386742 .1225535 3.58 0.000 .1984737 .6788748 1.x10 | .1281608 .3533009 0.36 0.717 -.5642962 .8206178 1.x11 | -.1410168 .6800977 -0.21 0.836 -1.473984 1.19195 | x10#x11 | 1 1 | .4539155 .889635 0.51 0.610 -1.289737 2.197568 | 1.x12 | -.2686829 .5875363 -0.46 0.647 -1.420233 .882867 x13 | -.1141443 .230882 -0.49 0.621 -.5666646 .338376 x14 | .0013928 .0038212 0.36 0.715 -.0060966 .0088822 1.x15 | -.1661187 .6020005 -0.28 0.783 -1.346018 1.013781 x16 | -.0155677 .0053069 -2.93 0.003 -.025969 -.0051663 | x15#c.x16 | 1 | .0027121 .0076237 0.36 0.722 -.0122302 .0176543 | x17 | .2812853 .1835776 1.53 0.125 -.0785201 .6410908 _cons | -7.998821 1.645493 -4.86 0.000 -11.22393 -4.773715 -------------+---------------------------------------------------------------- /athrho | 1.003006 1.329345 0.75 0.451 -1.602462 3.608475 /lnsigma | -.5072924 .1124413 -4.51 0.000 -.7276732 -.2869115 -------------+---------------------------------------------------------------- rho | .7628539 .5557379 -.9220383 .998533 sigma | .6021237 .0677035 .4830316 .7505781 lambda | .4593324 .3766132 -.2788158 1.197481 ------------------------------------------------------------------------------ Wald test of indep. eqns. (rho = 0): chi2(1) = 0.57 Prob > chi2 = 0.4505
Code:
margins, dydx(*) expression(normal(predict(xbsel))) //for AMEs of selection equation
Code:
Average marginal effects Number of obs = 472 Model VCE : Robust Expression : normal(predict(xbsel)) dy/dx w.r.t. : x1 x2 round 1.x3 x4 x5 x6 x7 1.x8 x9 1.x10 1.x11 1.x12 x13 x14 1.x15 x16 x17 x18 1.x19 1.x20 ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | 0 (omitted) x2 | 0 (omitted) round | -.0344662 .0111654 -3.09 0.002 -.05635 -.0125823 1.x3 | -.0051114 .0298637 -0.17 0.864 -.0636432 .0534204 x4 | .0000647 .0000153 4.22 0.000 .0000347 .0000948 x5 | -.0026047 .0115287 -0.23 0.821 -.0252005 .0199911 x6 | .0059726 .0093806 0.64 0.524 -.0124131 .0243583 x7 | .0033946 .0012834 2.64 0.008 .0008791 .0059101 1.x8 | -.0128698 .0297024 -0.43 0.665 -.0710854 .0453457 x9 | .0431937 .0113826 3.79 0.000 .0208843 .0655031 1.x10 | .0406141 .0486084 0.84 0.403 -.0546566 .1358847 1.x11 | .0174241 .0212462 0.82 0.412 -.0242176 .0590658 1.x12 | -.0264907 .0569879 -0.46 0.642 -.138185 .0852036 x13 | -.0112391 .0229835 -0.49 0.625 -.056286 .0338078 x14 | .0001371 .000378 0.36 0.717 -.0006037 .000878 1.x15 | -.006072 .0457602 -0.13 0.894 -.0957605 .0836164 x16 | -.0013274 .0004467 -2.97 0.003 -.0022029 -.0004518 x17 | .0276965 .0172296 1.61 0.108 -.0060728 .0614658 x18 | .0094019 .0026424 3.56 0.000 .004223 .0145808 1.x19 | -.0441527 .0200581 -2.20 0.028 -.0834659 -.0048395 1.x20 | -.0544046 .0450362 -1.21 0.227 -.142674 .0338648 ------------------------------------------------------------------------------ Note: dy/dx for factor levels is the discrete change from the base level.
Any help is highly appreciated!
Thanks
0 Response to Pooled panel Heckman MLE vs. pooled panel Heckman Two-step
Post a Comment