Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: predictions from heckman very different from observed


From   Nikolaos Kanellopoulos <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: predictions from heckman very different from observed
Date   Thu, 13 Dec 2012 13:59:22 +0000 (GMT)

Dear all,

I estimate a wage equation using the ML version of the Heckman command. The dependent variable is the log of hourly wage and I use the procedure described in MUS by Cameron and Trivedi to get the predicted wages in levels. The problem I have is that the predicted wages are very low compared to the observed wages. In particular, y=6.009, E(y)=2.247 or 2.683 for the estimation sample and E(y|y!=.)=6.817.

Moreover, when I run the model separately for men and women the average predicted wages (conditional and unconditional) are larger for women even though their observed average is lower.

Any thoughts why this is happening (see results in the end of email)?

Thank you in advance
Nikos

. heckman lnhwg $xvarsac if period == 2, select($zvarsac) 

Iteration 0:   log likelihood = -56059.406  
Iteration 1:   log likelihood = -56050.387  
Iteration 2:   log likelihood = -56050.371  
Iteration 3:   log likelihood = -56050.371  

Heckman selection model                         Number of obs      =    101835
(regression model with sample selection)        Censored obs       =     73243
                                                Uncensored obs     =     28592

                                                Wald chi2(130)     =  27364.89
Log likelihood = -56050.37                      Prob > chi2        =    0.0000

------------------------------------------------------------------------------
       lnhwg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
lnhwg        |
          v1 |
          1  |   .1405343   .0367721     3.82   0.000     .0684622    .2126064
          2  |   .0469457    .030325     1.55   0.122    -.0124902    .1063816
          4  |  -.0263412   .0263633    -1.00   0.318    -.0780123      .02533
          5  |  -.1122694   .0403072    -2.79   0.005      -.19127   -.0332688
          6  |  -.0555981    .023813    -2.33   0.020    -.1022706   -.0089255
          7  |   .1557497    .054379     2.86   0.004     .0491687    .2623306
          8  |   -.104675    .085015    -1.23   0.218    -.2713013    .0619514
          9  |  -.0340463   .0379109    -0.90   0.369    -.1083502    .0402577
         10  |  -.0279233   .0678232    -0.41   0.681    -.1608543    .1050077
         11  |  -.0950452   .0333643    -2.85   0.004    -.1604381   -.0296523
         12  |  -.1581143   .0908025    -1.74   0.082     -.336084    .0198554
         13  |   .0089266   .0378355     0.24   0.813    -.0652296    .0830829
         14  |   .2447555   .0743117     3.29   0.001     .0991072    .3904038
         15  |     .22781   .0641243     3.55   0.000     .1021286    .3534914
         16  |  -.0605822   .0945024    -0.64   0.521    -.2458035    .1246392
         17  |  -.0628561   .0816088    -0.77   0.441    -.2228064    .0970943
         18  |  -.0554997   .0774083    -0.72   0.473    -.2072173    .0962178
         19  |   .2746892   .0477287     5.76   0.000     .1811427    .3682357
         20  |   .1212234   .0733686     1.65   0.098    -.0225764    .2650233
         21  |   .1279838    .077686     1.65   0.099    -.0242779    .2802456
         22  |   .0120982   .0600432     0.20   0.840    -.1055842    .1297806
         23  |   .0337195   .0324568     1.04   0.299    -.0298947    .0973337
         24  |   .0013841   .0710655     0.02   0.984    -.1379016    .1406699
         25  |   .0571335   .0355606     1.61   0.108    -.0125641    .1268311
         26  |  -.1264217    .085914    -1.47   0.141    -.2948101    .0419666
         27  |   .2729594   .0498995     5.47   0.000     .1751582    .3707606
         28  |    .184259    .036492     5.05   0.000     .1127359     .255782
         29  |   .2919003   .0698225     4.18   0.000     .1550507      .42875
             |
          v2 |   .0003214   .0016029     0.20   0.841    -.0028203     .003463
             |
     v1#c.v2 |
          1  |   -.011764   .0025896    -4.54   0.000    -.0168395   -.0066885
          2  |  -.0017117   .0025491    -0.67   0.502    -.0067079    .0032845
          4  |   .0052595   .0030257     1.74   0.082    -.0006708    .0111898
          5  |   .0133875   .0039881     3.36   0.001      .005571     .021204
          6  |   .0072001   .0024879     2.89   0.004      .002324    .0120763
          7  |   .0032429   .0058415     0.56   0.579    -.0082063    .0146921
          8  |    .017078   .0106603     1.60   0.109    -.0038158    .0379718
          9  |   .0119582   .0046321     2.58   0.010     .0028794     .021037
         10  |   -.004808   .0091992    -0.52   0.601     -.022838     .013222
         11  |   .0152968   .0042345     3.61   0.000     .0069972    .0235963
         12  |   .0316381   .0117346     2.70   0.007     .0086387    .0546376
         13  |   .0056551   .0045055     1.26   0.209    -.0031754    .0144857
         14  |  -.0002032   .0076244    -0.03   0.979    -.0151468    .0147403
         15  |   .0043123   .0068547     0.63   0.529    -.0091227    .0177472
         16  |   .0281485   .0118901     2.37   0.018     .0048444    .0514526
         17  |   .0354043   .0109495     3.23   0.001     .0139435     .056865
         18  |   .0230234    .008273     2.78   0.005     .0068086    .0392382
         19  |  -.0023888   .0056613    -0.42   0.673    -.0134846    .0087071
         20  |   .0015243   .0073634     0.21   0.836    -.0129076    .0159563
         21  |   .0071125   .0077366     0.92   0.358     -.008051     .022276
         22  |   .0209899   .0070073     3.00   0.003     .0072558     .034724
         23  |   .0145845   .0036037     4.05   0.000     .0075213    .0216477
         24  |   .0104166   .0084007     1.24   0.215    -.0060484    .0268816
         25  |    .013635    .003731     3.65   0.000     .0063224    .0209475
         26  |   .0313759   .0088994     3.53   0.000     .0139333    .0488185
         27  |  -.0058294   .0080356    -0.73   0.468    -.0215787      .00992
         28  |   .0165462   .0048772     3.39   0.001     .0069871    .0261054
         29  |   .0154256   .0083668     1.84   0.065     -.000973    .0318243
             |
   c.v2#c.v2 |   .0001343   .0000341     3.94   0.000     .0000674    .0002011
             |
v1#c.v2#c.v2 |
          1  |    .000106    .000045     2.36   0.018     .0000178    .0001942
          2  |  -.0000362   .0000506    -0.72   0.475    -.0001353    .0000629
          4  |  -.0000994   .0000758    -1.31   0.190     -.000248    .0000492
          5  |  -.0002394   .0000864    -2.77   0.006    -.0004088     -.00007
          6  |  -.0000914   .0000582    -1.57   0.116    -.0002054    .0000226
          7  |  -.0000908   .0001382    -0.66   0.511    -.0003616    .0001801
          8  |  -.0002443    .000265    -0.92   0.357    -.0007638    .0002752
          9  |  -.0001587   .0001212    -1.31   0.190    -.0003963    .0000788
         10  |   .0005014     .00026     1.93   0.054    -8.10e-06     .001011
         11  |   -.000253   .0001176    -2.15   0.031    -.0004834   -.0000225
         12  |  -.0008003   .0003418    -2.34   0.019    -.0014703   -.0001304
         13  |  -.0000475   .0001224    -0.39   0.698    -.0002875    .0001924
         14  |   .0000644   .0001737     0.37   0.711    -.0002761    .0004049
         15  |   -.000046   .0001641    -0.28   0.779    -.0003677    .0002756
         16  |  -.0006028   .0003105    -1.94   0.052    -.0012114    5.86e-06
         17  |  -.0007131   .0003332    -2.14   0.032    -.0013662   -.0000601
         18  |  -.0005149   .0001934    -2.66   0.008     -.000894   -.0001358
         19  |    .000177   .0001402     1.26   0.207    -.0000978    .0004519
         20  |   .0001849   .0001712     1.08   0.280    -.0001507    .0005205
         21  |  -.0000862    .000176    -0.49   0.624    -.0004312    .0002588
         22  |  -.0003842   .0001727    -2.22   0.026    -.0007226   -.0000458
         23  |  -.0001949   .0000882    -2.21   0.027    -.0003678    -.000022
         24  |  -.0000582   .0002127    -0.27   0.785    -.0004751    .0003588
         25  |  -.0001385   .0000893    -1.55   0.121    -.0003136    .0000366
         26  |  -.0005447   .0002211    -2.46   0.014    -.0009781   -.0001112
         27  |   .0002167   .0002917     0.74   0.457    -.0003549    .0007884
         28  |   -.000404   .0001414    -2.86   0.004    -.0006812   -.0001268
         29  |  -.0003773   .0002177    -1.73   0.083     -.000804    .0000493
             |
          v3 |   .0705147   .0040717    17.32   0.000     .0625344    .0784951
             |
          v4 |
          2  |  -.2370253   .0127142   -18.64   0.000    -.2619448   -.2121059
          3  |  -.1941376   .0076409   -25.41   0.000    -.2091134   -.1791618
             |
          v5 |
          1  |  -.0170644    .009481    -1.80   0.072    -.0356469     .001518
          2  |  -.0187411   .0096394    -1.94   0.052    -.0376339    .0001517
          3  |   .0903678   .0123608     7.31   0.000      .066141    .1145945
          4  |   .0372835   .0095881     3.89   0.000     .0184912    .0560758
          5  |   .0097628   .0094905     1.03   0.304    -.0088383    .0283638
          6  |  -.0306734    .013235    -2.32   0.020    -.0566135   -.0047333
          7  |   .0232329   .0096604     2.40   0.016     .0042988    .0421669
          8  |   .0254702   .0090799     2.81   0.005     .0076739    .0432664
         10  |   .0346836   .0097353     3.56   0.000     .0156027    .0537645
         11  |   .0059777   .0138117     0.43   0.665    -.0210928    .0330482
         12  |   .0125233   .0122307     1.02   0.306    -.0114484    .0364951
         13  |     .02741   .0085307     3.21   0.001     .0106901    .0441299
             |
          v6 |
          2  |  -.0327036   .0114667    -2.85   0.004    -.0551778   -.0102294
          3  |  -.0294628    .007212    -4.09   0.000    -.0435979   -.0153276
          4  |   -.021645   .0080887    -2.68   0.007    -.0374985   -.0057914
          5  |  -.0222819   .0088946    -2.51   0.012     -.039715   -.0048488
             |
          v7 |
          1  |  -.0405702   .0122746    -3.31   0.001     -.064628   -.0165125
          2  |   .0763601   .0332315     2.30   0.022     .0112276    .1414926
          3  |   .2379452   .0211354    11.26   0.000     .1965206    .2793699
          4  |   .0900824   .0062546    14.40   0.000     .0778237    .1023411
          5  |   .0839119   .0121623     6.90   0.000     .0600743    .1077495
          6  |   .1276211   .0077394    16.49   0.000     .1124522      .14279
          8  |   .0497563   .0063019     7.90   0.000     .0374048    .0621077
          9  |   .1377267    .012004    11.47   0.000     .1141993     .161254
         10  |   .1740053   .0099378    17.51   0.000     .1545275    .1934831
         11  |   .0226617   .0083882     2.70   0.007     .0062211    .0391022
         12  |   .0430055   .0084472     5.09   0.000     .0264492    .0595617
         13  |   .2911112   .0098379    29.59   0.000     .2718292    .3103931
         14  |  -.0127426   .0088565    -1.44   0.150     -.030101    .0046158
         15  |   .0125831   .0110811     1.14   0.256    -.0091355    .0343017
         16  |  -.2060467   .0131847   -15.63   0.000    -.2318882   -.1802053
         17  |   .1055014    .076806     1.37   0.170    -.0450355    .2560383
             |
          v8 |   .0791783   .0036615    21.62   0.000     .0720018    .0863548
        1.v9 |   .0937934   .0149065     6.29   0.000     .0645772    .1230095
             |
     v9#c.v2 |
          1  |   .0050052   .0012696     3.94   0.000     .0025168    .0074936
             |
v9#c.v2#c.v2 |
          1  |  -.0000569   .0000254    -2.24   0.025    -.0001066   -7.15e-06
             |
         v11 |
          7  |   .1325569   .0052178    25.40   0.000     .1223301    .1427836
          8  |   .0927179   .0049073    18.89   0.000     .0830997     .102336
             |
         v12 |
          1  |   .0332957    .004646     7.17   0.000     .0241897    .0424017
          3  |   .0066404   .0055675     1.19   0.233    -.0042717    .0175526
          4  |  -.0059572   .0055663    -1.07   0.285     -.016867    .0049527
             |
       _cons |    1.49079   .0246423    60.50   0.000     1.442492    1.539088
-------------+----------------------------------------------------------------
select       |
         v13 |
          1  |   -.312142   .0113899   -27.41   0.000    -.3344659   -.2898182
          3  |   .2288368   .0166555    13.74   0.000     .1961926    .2614809
          4  |   .4508384   .0190044    23.72   0.000     .4135904    .4880863
          5  |   .3995711   .0141445    28.25   0.000     .3718484    .4272938
          6  |   .5572528   .0354082    15.74   0.000      .487854    .6266516
             |
         v14 |   .1866015   .0028108    66.39   0.000     .1810925    .1921105
             |
 c.v14#c.v14 |  -.0022167   .0000341   -65.07   0.000    -.0022835     -.00215
             |
          v3 |  -.0694488   .0127675    -5.44   0.000    -.0944727   -.0444249
             |
         v15 |
          1  |    .105427   .0192862     5.47   0.000     .0676267    .1432272
          2  |  -.0676413   .0124549    -5.43   0.000    -.0920524   -.0432302
          3  |  -.0487929   .0212949    -2.29   0.022    -.0905302   -.0070557
             |
          v4 |
          2  |   .4029376   .0344477    11.70   0.000     .3354213    .4704538
          3  |   .4743026   .0171719    27.62   0.000     .4406463    .5079589
             |
          v5 |
          1  |     .00197   .0242813     0.08   0.935    -.0456204    .0495604
          2  |  -.0009342   .0247638    -0.04   0.970    -.0494703    .0476018
          3  |  -.0194526   .0328239    -0.59   0.553    -.0837863    .0448811
          4  |  -.0339977   .0240475    -1.41   0.157    -.0811299    .0131346
          5  |  -.0195216   .0243038    -0.80   0.422    -.0671563     .028113
          6  |   .1034091    .035394     2.92   0.003     .0340381      .17278
          7  |  -.0935439   .0238777    -3.92   0.000    -.1403434   -.0467445
          8  |   .0961417   .0238852     4.03   0.000     .0493276    .1429557
         10  |  -.0923982   .0255345    -3.62   0.000    -.1424448   -.0423516
         11  |  -.1549991   .0346014    -4.48   0.000    -.2228165   -.0871817
         12  |   .0099103   .0316818     0.31   0.754    -.0521848    .0720054
         13  |   .0601067   .0222389     2.70   0.007     .0165192    .1036942
             |
          v6 |
          2  |  -.0870117   .0298341    -2.92   0.004    -.1454854   -.0285381
          3  |  -.1913193    .018651   -10.26   0.000    -.2278745   -.1547641
          4  |  -.2409326   .0205058   -11.75   0.000    -.2811232    -.200742
          5  |   -.307227    .021781   -14.11   0.000     -.349917    -.264537
             |
         v16 |  -.4267022   .2584641    -1.65   0.099    -.9332824    .0798781
             |
         v11 |
          7  |   .2301844   .0328466     7.01   0.000     .1658063    .2945625
          8  |    .123804   .0215129     5.75   0.000     .0816394    .1659685
             |
         v12 |
          1  |    .028929   .0122591     2.36   0.018     .0049016    .0529564
          3  |   .0336482   .0149595     2.25   0.024      .004328    .0629683
          4  |   -.022284   .0168357    -1.32   0.186    -.0552814    .0107134
             |
         v17 |  -.0546934   .0058848    -9.29   0.000    -.0662273   -.0431595
         v18 |  -.1423259   .0097779   -14.56   0.000    -.1614903   -.1231615
         v19 |   .0805902   .0104115     7.74   0.000     .0601841    .1009964
       _cons |  -3.951667   .0820076   -48.19   0.000    -4.112399   -3.790935
-------------+----------------------------------------------------------------
     /athrho |  -.6295655   .0382775   -16.45   0.000    -.7045881    -.554543
    /lnsigma |  -1.179191   .0137634   -85.68   0.000    -1.206167   -1.152215
-------------+----------------------------------------------------------------
         rho |   -.557753   .0263698                      -.607272   -.5039173
       sigma |   .3075274   .0042326                      .2993425    .3159361
      lambda |  -.1715243   .0103828                     -.1918742   -.1511744
------------------------------------------------------------------------------
LR test of indep. eqns. (rho = 0):   chi2(1) =   113.59   Prob > chi2 = 0.0000
------------------------------------------------------------------------------

. predict probpos, psel 
. predict x1b1, xbsel 
. predict x2b2, xb 
(106970 missing values generated)
. scalar  sig2sq = e(sigma)^2 
. scalar  sig12sq = e(rho)*e(sigma)^2 
. generate yhatheck = exp(x2b2 + 0.5*(sig2sq))*(1 - normal(-x1b1-sig12sq)) 
(106970 missing values generated)
. generate yhatposheck = yhatheck/probpos 
(106970 missing values generated)
. summarize hwg yhatheck if period == 2

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         hwg |     28644    6.009612        2.87   2.000454   56.08289
    yhatheck |     57370    2.247878    1.490795   .0209093   11.06441

. summarize hwg yhatheck if e(sample) & lnhwg!=.

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         hwg |     28592    6.013462     2.87082   2.000454   56.08289
    yhatheck |     28592    2.683502    1.582859   .0792262   11.06441

. summarize hwg yhatposheck if e(sample) & hwg!=.

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         hwg |     28592    6.013462     2.87082   2.000454   56.08289
 yhatposheck |     28592    6.817118    2.152765   2.821729    19.7986

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index