Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by FernandoRios View Post
    In that case there is something else with your data
    I can’t say much at this point
    but open then the ado file and try to replicate it yourself
    only that way you can figure out what is going on
    it may be something that is specific to your data
    I'm trying to manually do the xtheckmanfe in "wagework" example following the Semykina and Wooldrige 2008 paper
    in 5.2 Parametric Correction it say that
    PROCEDURE 5.2.1:
    (i) For each time period, run probit of sit2 on 1, zit, zi line (which I assume is the average of the instrumental for each individual), i=1,...N, and obtain the inverse Mills ratios
    when sit2 is "working" the indicator variable nad z the instrumental variable "market"

    So i run this code to estimate the Inverse MIlls Ratio

    Code:
    clear all
    set more off
    webuse wagework
    egen obs=sum(working), by(personid)
    replace year=year-r(min)+1
    scalar tmax=r(max)-r(min)+1
    
    /*Media temporal market*/
    local j = 0
    foreach var of varlist market {
        qui egen m`var' = mean(`var'), by(personid)
        local j = `j' + 1
    }
    
    *GENERATE INVERSE MILLS RATIO FOR EACH T;
    
    
    * Definir la macro year con el rango de años que deseas procesar.
    *GENERATE INVERSE MILLS RATIO FOR EACH T;
    gen lambda=. 
    local i = 1
    while `i' <= tmax {
        di "Year=" `i'
        probit working age market mmarket if year == `i'
        predict xb, xb
        replace lambda = normalden(xb) / normal(xb) if  year == `i'
        drop xb
        local i = `i' + 1
    }
    The problem is that the inverse of the mill ratio calculated manually is different from the one calculated when I apply the xtheckmanfe
    I don't know what I'm not understanding about the manual procedure.

    Thank you very much for your time and help

    Comment


    • #17
      Got you.
      If you scatter lambda with the one xtheckmanfe creates, you will see how these variables compare.
      Otherwise, I trick I use here is to use "score" to predict the IMR, instead of the formula you are using. Because of this, the numbers will be exact when working==1 but will be different otherwise
      Best wishes
      F

      Comment


      • #18
        Originally posted by FernandoRios View Post
        Got you.
        If you scatter lambda with the one xtheckmanfe creates, you will see how these variables compare.
        Otherwise, I trick I use here is to use "score" to predict the IMR, instead of the formula you are using. Because of this, the numbers will be exact when working==1 but will be different otherwise
        Best wishes
        F
        Thank you very much, it helped me a lot and simplified what you suggested about using "score" a lot.
        Now the code I run would be this

        Code:
        gen lambda=. 
        local i = 1
        while `i' <= tmax {
            di "Year=" `i'
            probit working age market mmarket if year == `i'
            predict IMRR, score
            replace lambda=IMRR
            drop IMRR
            local i = `i' + 1
        }
        and in the graph it seems that both variables end up being very similar.
        Click image for larger version

Name:	Graph.png
Views:	1
Size:	29.7 KB
ID:	1729877

        Comment


        • #19
          Originally posted by FernandoRios View Post
          Got you.
          If you scatter lambda with the one xtheckmanfe creates, you will see how these variables compare.
          Otherwise, I trick I use here is to use "score" to predict the IMR, instead of the formula you are using. Because of this, the numbers will be exact when working==1 but will be different otherwise
          Best wishes
          F
          Sorry to keep bothering you, so with "score" I calculate the residuals and is that equivalent to calculating the formula I used before?
          Last edited by Facundo Duran; 12 Oct 2023, 08:07.

          Comment


          • #20
            Its bsically the same, when data is observed. But different when data is not observed.
            Now, you are doing this correctly, but using the incorrect specification.
            Use xtheckmanfe, and see the specification. You are not using the same manually, which is creating the differences you show and report
            F

            Comment


            • #21
              Originally posted by FernandoRios View Post
              Its bsically the same, when data is observed. But different when data is not observed.
              Now, you are doing this correctly, but using the incorrect specification.
              Use xtheckmanfe, and see the specification. You are not using the same manually, which is creating the differences you show and report
              F
              Thank you very much!
              So, the xtheckmanfe specification in the example is xtheckmanfe wage age tenure, select(working = age market)
              So the probit is working age market
              So I should do this, right?
              Code:
              gen lambda=. 
              local i = 1
              while `i' <= tmax {
                  di "Year=" `i'
                  probit working age market  if year == `i'
                  predict IMRR, score
                  replace lambda=IMRR
                  drop IMRR
                  local i = `i' + 1
              }
              "Its bsically the same, when data is observed. But different when data is not observed."

              So if I understand correctly, it is the same if working=1, but different if working is=0?
              And in the case where working is 0, what should I do?

              Comment


              • #22
                Originally posted by FernandoRios View Post
                Its bsically the same, when data is observed. But different when data is not observed.
                Now, you are doing this correctly, but using the incorrect specification.
                Use xtheckmanfe, and see the specification. You are not using the same manually, which is creating the differences you show and report
                F
                Sorry for the insistence, I think I'm almost there.
                Running the xtheckmanfe from the example and seeing the output


                Code:
                . xtheckmanfe wage age tenure, select(working = age market)
                (running _xthck on estimation sample)
                
                Bootstrap replications (50)
                ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
                ..................................................    50
                
                Bootstrap results                               Number of obs     =      2,400
                                                                Replications      =         50
                
                                                   (Replications based on 600 clusters in personid)
                -----------------------------------------------------------------------------------
                                  |   Observed   Bootstrap                         Normal-based
                                  |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                ------------------+----------------------------------------------------------------
                wage              |
                              age |   .3936378   .1606187     2.45   0.014      .078831    .7084446
                           tenure |   .5616069   .0259277    21.66   0.000     .5107895    .6124243
                          _mn_age |  -.1992102   .1615033    -1.23   0.217    -.5157509    .1173305
                       _mn_tenure |    .054147   .0384261     1.41   0.159    -.0211669    .1294608
                       _mn_market |   .1145947   .0679483     1.69   0.092    -.0185816     .247771
                                  |
                             year |
                            2014  |  -.4155409    .372399    -1.12   0.264    -1.145429    .3143478
                            2015  |   .3017392   .2483368     1.22   0.224    -.1849919    .7884704
                            2016  |          0  (omitted)
                                  |
                  year#c._sel_imr |
                            2013  |    1.56706   .8335836     1.88   0.060    -.0667333    3.200854
                            2014  |   2.389964   1.081857     2.21   0.027     .2695632    4.510365
                            2015  |  -.2879282   .6464861    -0.45   0.656    -1.555018    .9791613
                            2016  |  -.3466007   .6741037    -0.51   0.607     -1.66782    .9746183
                                  |
                            _cons |   13.37841   .2868721    46.64   0.000     12.81615    13.94067
                ------------------+----------------------------------------------------------------
                select            |
                       year#c.age |
                            2013  |  -.0176858   .0073027    -2.42   0.015    -.0319989   -.0033728
                            2014  |  -.0068764   .0048229    -1.43   0.154    -.0163291    .0025763
                            2015  |  -.0299271   .0050721    -5.90   0.000    -.0398683   -.0199859
                            2016  |  -.0178935   .0049703    -3.60   0.000     -.027635    -.008152
                                  |
                    year#c.tenure |
                            2013  |   .0293393   .0611074     0.48   0.631     -.090429    .1491077
                            2014  |  -.0794829   .0291344    -2.73   0.006    -.1365853   -.0223805
                            2015  |  -.3028181   .0531267    -5.70   0.000    -.4069445   -.1986917
                            2016  |   .1254146   .0445997     2.81   0.005     .0380007    .2128284
                                  |
                    year#c.market |
                            2013  |   .1157192   .0650375     1.78   0.075    -.0117521    .2431904
                            2014  |   .1189732   .0348716     3.41   0.001     .0506261    .1873202
                            2015  |   .1807084   .0427004     4.23   0.000     .0970171    .2643997
                            2016  |   .1507835   .0325624     4.63   0.000     .0869624    .2146045
                                  |
                   year#c._mn_age |
                            2014  |          0  (omitted)
                            2015  |          0  (omitted)
                            2016  |          0  (omitted)
                                  |
                year#c._mn_tenure |
                            2013  |    .029388   .0233563     1.26   0.208    -.0163895    .0751655
                            2014  |   .0356927    .035492     1.01   0.315    -.0338704    .1052558
                            2015  |   .3617081   .0700105     5.17   0.000       .22449    .4989262
                            2016  |  -.1693612    .068068    -2.49   0.013    -.3027721   -.0359503
                                  |
                year#c._mn_market |
                            2013  |   .0073082   .0792801     0.09   0.927     -.148078    .1626944
                            2014  |   .0057587   .0638702     0.09   0.928    -.1194246     .130942
                            2015  |   -.045872   .0736829    -0.62   0.534    -.1902878    .0985439
                            2016  |   .0407136   .0673005     0.60   0.545    -.0911929    .1726201
                                  |
                             year |
                            2014  |   .2128739   .2694185     0.79   0.429    -.3151767    .7409245
                            2015  |   .4671509   .2777459     1.68   0.093     -.077221    1.011523
                            2016  |    .650277   .3036742     2.14   0.032     .0550866    1.245467
                                  |
                            _cons |   1.294284   .2428929     5.33   0.000     .8182222    1.770345
                -----------------------------------------------------------------------------------
                
                . 
                end of do-file
                I get the impression that the probit you are doing would be something like this

                probit working year#c.age year#c.tenure year#c.market year#c.mage year#c.mtenure year#c.mmarket year

                So the mill ratio would be calculated this way
                Code:
                gen lambda2=. 
                local i = 2013
                while `i' <= 2016 {
                    di "Year=" `i'
                    probit working year#c.age  year#c.tenure  year#c.market year#c.mage year#c.mtenure year#c.mmarket year if year == `i'
                    predict IMRR, score 
                    replace lambda2=IMRR 
                    drop IMRR
                    local i = `i' + 1
                }
                However, doing it this way, the ratio gives me even more difference

                Comment


                • #23
                  Almost there
                  1. you don’t need to interact with year if you use “if year==“
                  if you do make sure you replace imr by year too
                  right now your replace line does not condition on year

                  Comment


                  • #24
                    Originally posted by FernandoRios View Post
                    Almost there
                    1. you don’t need to interact with year if you use “if year==“
                    if you do make sure you replace imr by year too
                    right now your replace line does not condition on year
                    Thank you very much, now I get exactly the same result.

                    Something that is not clear to me is why, if in the xtheckamnfe command the selection equation is working = age market, i.e. it would be a probit of working as a function of age and market, the tenure variable must be included.
                    In addition, when I use my data, because of the way I constructed the tenure variable, which increases if the individual works and remains the same if he does not work, I would have a perfect separation problem, that is, it takes values that are completely predicted by the working variable.

                    So, it would be good to do the probits without taking into account the tenure variable? Doing

                    Code:
                    gen lambda2 = . 
                    local i = 1
                    while `i' <= 312 {
                        di "Periodo=" `i'
                        probit working c.edad  c.desempleo c.medad  c.mdesempleo if periodo == `i'
                        predict IMRR, score 
                        replace lambda2 = IMRR if periodo == `i'
                        drop IMRR
                        local i = `i' + 1
                    }

                    And then incorporate it in the other equation

                    Code:
                    reg rem_tot edad tenure mage mtenure mmarket T1 T2 ... T312  periodo#c.lambda2

                    Comment


                    • #25
                      I think this has to do with how one should think about heckman models.
                      The way I like to understand the strategy is that you use it as a way to correct for endogeneity. And in IV models, you include all exogenous variables in the model.

                      I should also say, this is the setup that Wooldridge suggests as well. However, if tenure is missing, then I can see why you couldn't estimate the model. And it may make sense to exclude it from the probit model.

                      Whether it is correct or not, I'm not sure. You may want to reach out to Jeff Wooldridge and ask about it.
                      F

                      Comment


                      • #26
                        Originally posted by FernandoRios View Post
                        I think this has to do with how one should think about heckman models.
                        The way I like to understand the strategy is that you use it as a way to correct for endogeneity. And in IV models, you include all exogenous variables in the model.

                        I should also say, this is the setup that Wooldridge suggests as well. However, if tenure is missing, then I can see why you couldn't estimate the model. And it may make sense to exclude it from the probit model.

                        Whether it is correct or not, I'm not sure. You may want to reach out to Jeff Wooldridge and ask about it.
                        F
                        I finally managed to run the model
                        First I generated the inverse of the mill ratio running 312 probits using the following command

                        Code:
                        *GENERATE INVERSE MILLS RATIO FOR EACH T;
                        gen lambda2 = . 
                        local i = 1
                        while `i' <= 312 {
                            di "Periodo=" `i'
                            probit working c.edad  c.desempleo c.medad  c.mdesempleo if periodo == `i'
                            predict IMRR, score 
                            replace lambda2 = IMRR if periodo == `i'
                            drop IMRR
                            local i = `i' + 1
                        }

                        And then I ran the regression incorporating the inverse of the mills ratio and each dummy of the period

                        Code:
                        reg rem_tot edad tenure medad mtenure mdesempleo T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 T21 T22 T23 T24 T25 T26 T27 T28 T29 T30 T31 T32 T33 T34 T35 T36 T37 T38 T39 T40 T41 T42 T43 T44 T45 T46 T47 T48 T49 T50 T51 T52 T53 T54 T55 T56 T57 T58 T59 T60 T61 T62 T63 T64 T65 T66 T67 T68 T69 T70 T71 T72 T73 T74 T75 T76 T77 T78 T79 T80 T81 T82 T83 T84 T85 T86 T87 T88 T89 T90 T91 T92 T93 T94 T95 T96 T97 T98 T99 T100 T101 T102 T103 T104 T105 T106 T107 T108 T109 T110 T111 T112 T113 T114 T115 T116 T117 T118 T119 T120 T121 T122 T123 T124 T125 T126 T127 T128 T129 T130 T131 T132 T133 T134 T135 T136 T137 T138 T139 T140 T141 T142 T143 T144 T145 T146 T147 T148 T149 T150 T151 T152 T153 T154 T155 T156 T157 T158 T159 T160 T161 T162 T163 T164 T165 T166 T167 T168 T169 T170 T171 T172 T173 T174 T175 T176 T177 T178 T179 T180 T181 T182 T183 T184 T185 T186 T187 T188 T189 T190 T191 T192 T193 T194 T195 T196 T197 T198 T199 T200 T201 T202 T203 T204 T205 T206 T207 T208 T209 T210 T211 T212 T213 T214 T215 T216 T217 T218 T219 T220 T221 T222 T223 T224 T225 T226 T227 T228 T229 T230 T231 T232 T233 T234 T235 T236 T237 T238 T239 T240 T241 T242 T243 T244 T245 T246 T247 T248 T249 T250 T251 T252 T253 T254 T255 T256 T257 T258 T259 T260 T261 T262 T263 T264 T265 T266 T267 T268 T269 T270 T271 T272 T273 T274 T275 T276 T277 T278 T279 T280 T281 T282 T283 T284 T285 T286 T287 T288 T289 T290 T291 T292 T293 T294 T295 T296 T297 T298 T299 T300 T301 T302 T303 T304 T305 T306 T307 T308 T309 T310 T311 T312 ano#c.lambda2
                        This gives the following result

                        Comment


                        • #27
                          Code:
                               Source |       SS           df       MS      Number of obs   =   157,521
                          -------------+----------------------------------   F(342, 157178)  =     82.38
                                 Model |  1.0292e+14       342  3.0095e+11   Prob > F        =    0.0000
                              Residual |  5.7422e+14   157,178  3.6533e+09   R-squared       =    0.1520
                          -------------+----------------------------------   Adj R-squared   =    0.1502
                                 Total |  6.7714e+14   157,520  4.2988e+09   Root MSE        =     60443
                          
                          -------------------------------------------------------------------------------
                                rem_tot |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                          --------------+----------------------------------------------------------------
                                   edad |   490.6474     627.76     0.78   0.434     -739.749    1721.044
                                 tenure |   63.81885   4.526538    14.10   0.000     54.94693    72.69077
                                  medad |   266.6898   597.1092     0.45   0.655    -903.6317    1437.011
                                mtenure |  -10.85199   5.093582    -2.13   0.033    -20.83531   -.8686809
                             mdesempleo |  -27936.96    3582.47    -7.80   0.000    -34958.52   -20915.39
                                     T1 |  -78950.38   15662.38    -5.04   0.000    -109648.3   -48252.44
                                     T2 |  -79049.96   15661.59    -5.05   0.000    -109746.3   -48353.57
                                     T3 |  -79114.79   15659.84    -5.05   0.000    -109807.7   -48421.84
                                     T4 |  -79184.98   15656.41    -5.06   0.000    -109871.2   -48498.75
                                     T5 |  -79390.13   15673.77    -5.07   0.000    -110110.4   -48669.87
                                     T6 |  -78860.95   15665.42    -5.03   0.000    -109564.8   -48157.05
                                     T7 |  -79422.48   15664.89    -5.07   0.000    -110125.3   -48719.61
                                     T8 |  -79350.78   15655.89    -5.07   0.000      -110036   -48665.56
                                     T9 |  -79353.35    15657.4    -5.07   0.000    -110041.5   -48665.18
                                    T10 |  -79466.34   15661.68    -5.07   0.000    -110162.9   -48769.77
                                    T11 |  -79474.44   15660.11    -5.07   0.000    -110167.9   -48780.95
                                    T12 |  -78947.22   15647.09    -5.05   0.000    -109615.2   -48279.25
                                    T13 |  -79899.13   15080.95    -5.30   0.000    -109457.5   -50340.77
                                    T14 |   -79909.8    15067.9    -5.30   0.000    -109442.6   -50377.04
                                    T15 |  -80094.23   15080.78    -5.31   0.000    -109652.2   -50536.23
                                    T16 |  -80207.44   15076.93    -5.32   0.000    -109757.9   -50656.96
                                    T17 |  -80362.48   15090.24    -5.33   0.000      -109939   -50785.92
                                    T18 |   -79802.2   15069.16    -5.30   0.000    -109337.4   -50266.97
                                    T19 |  -80351.15    15081.8    -5.33   0.000    -109911.2   -50791.13
                                    T20 |  -80399.72   15078.63    -5.33   0.000    -109953.5   -50845.91
                                    T21 |  -80392.28   15081.07    -5.33   0.000    -109950.9   -50833.69
                                    T22 |  -80353.13   15079.18    -5.33   0.000      -109908   -50798.26
                                    T23 |  -80441.65   15075.31    -5.34   0.000    -109988.9   -50894.36
                                    T24 |  -79888.77    15060.9    -5.30   0.000    -109407.8   -50369.71
                                    T25 |  -83379.48   14566.88    -5.72   0.000    -111930.3   -54828.71
                                    T26 |  -83569.78   14578.02    -5.73   0.000    -112142.4   -54997.17
                                    T27 |  -83598.55   14567.17    -5.74   0.000    -112149.9   -55047.21
                                    T28 |  -83775.01   14592.12    -5.74   0.000    -112375.2   -55174.77
                                    T29 |   -83728.3   14581.91    -5.74   0.000    -112308.5   -55148.07
                                    T30 |  -83510.63   14591.53    -5.72   0.000    -112109.7   -54911.53
                                    T31 |  -84052.43   14606.97    -5.75   0.000    -112681.8   -55423.07
                                    T32 |  -84060.92    14602.6    -5.76   0.000    -112681.7   -55440.13
                                    T33 |  -84210.79    14610.4    -5.76   0.000    -112846.9   -55574.71
                                    T34 |   -84302.9   14618.13    -5.77   0.000    -112954.1   -55651.67
                                    T35 |  -84535.31   14644.44    -5.77   0.000    -113238.1    -55832.5
                                    T36 |  -84019.35   14630.33    -5.74   0.000    -112694.5   -55344.21
                                    T37 |  -87095.12   14124.28    -6.17   0.000    -114778.4   -59411.83
                                    T38 |  -87456.68    14148.3    -6.18   0.000    -115187.1   -59726.31
                                    T39 |  -87161.02   14105.61    -6.18   0.000    -114807.7   -59514.31
                                    T40 |  -87229.88   14108.17    -6.18   0.000    -114881.6   -59578.15
                                    T41 |  -87490.78   14121.89    -6.20   0.000    -115169.4   -59812.18
                                    T42 |  -87137.97   14133.65    -6.17   0.000    -114839.6   -59436.32
                                    T43 |   -87728.6   14146.28    -6.20   0.000      -115455   -60002.18
                                    T44 |  -87887.91    14164.1    -6.20   0.000    -115649.2   -60126.58
                                    T45 |   -87983.5   14163.98    -6.21   0.000    -115744.6    -60222.4
                                    T46 |  -87854.61    14148.8    -6.21   0.000      -115586   -60123.27
                                    T47 |  -88059.51   14164.27    -6.22   0.000    -115821.2   -60297.84
                                    T48 |  -87459.89   14148.75    -6.18   0.000    -115191.2   -59728.63
                                    T49 |  -82075.76   13050.41    -6.29   0.000    -107654.3   -56497.23
                                    T50 |  -82081.76   13044.15    -6.29   0.000      -107648   -56515.49
                                    T51 |  -82127.68      13051    -6.29   0.000    -107707.4   -56547.98
                                    T52 |  -82129.52   13057.46    -6.29   0.000    -107721.9   -56537.17
                                    T53 |  -82300.39   13063.21    -6.30   0.000      -107904   -56696.78
                                    T54 |  -82096.51   13064.55    -6.28   0.000    -107702.8   -56490.26
                                    T55 |  -82710.18   13070.74    -6.33   0.000    -108328.5   -57091.81
                                    T56 |  -82713.99   13064.93    -6.33   0.000      -108321      -57107
                                    T57 |  -82751.75   13067.58    -6.33   0.000    -108363.9   -57139.57
                                    T58 |  -82896.96      13074    -6.34   0.000    -108521.7   -57272.19
                                    T59 |  -82893.23   13067.84    -6.34   0.000    -108505.9   -57280.53
                                    T60 |  -82472.88   13061.84    -6.31   0.000    -108073.8   -56871.95
                                    T61 |   -84155.9   12542.28    -6.71   0.000    -108738.5    -59573.3
                                    T62 |  -84295.75   12541.88    -6.72   0.000    -108877.6   -59713.92
                                    T63 |  -83967.06   12539.41    -6.70   0.000      -108544   -59390.08
                                    T64 |  -84415.78   12546.15    -6.73   0.000      -109006   -59825.58
                                    T65 |  -84612.12   12555.57    -6.74   0.000    -109220.8   -60003.45
                                    T66 |  -84126.01    12556.4    -6.70   0.000    -108736.3   -59515.73
                                    T67 |  -84643.69   12555.81    -6.74   0.000    -109252.8   -60034.57
                                    T68 |  -84738.81   12562.17    -6.75   0.000    -109360.4   -60117.22
                                    T69 |   -84728.8    12563.7    -6.74   0.000    -109353.4    -60104.2
                                    T70 |  -85008.64   12576.14    -6.76   0.000    -109657.6   -60359.66
                                    T71 |  -85036.75   12582.92    -6.76   0.000      -109699    -60374.5
                                    T72 |  -84590.71   12576.39    -6.73   0.000    -109240.2   -59941.25
                                    T73 |  -86577.31   12225.74    -7.08   0.000    -110539.5   -62615.12
                                    T74 |  -87019.95   12260.62    -7.10   0.000    -111050.5   -62989.38
                                    T75 |  -87285.62   12279.24    -7.11   0.000    -111352.7   -63218.58
                                    T76 |  -87116.55   12254.62    -7.11   0.000    -111135.3   -63097.76
                                    T77 |  -87305.22   12263.96    -7.12   0.000    -111342.3   -63268.11
                                    T78 |  -86619.18   12249.32    -7.07   0.000    -110627.6   -62610.77
                                    T79 |   -87263.5   12258.87    -7.12   0.000    -111290.6   -63236.37
                                    T80 |  -87261.61   12263.13    -7.12   0.000    -111297.1   -63226.13
                                    T81 |  -87053.18   12261.32    -7.10   0.000    -111085.1   -63021.26
                                    T82 |  -87209.43   12251.71    -7.12   0.000    -111222.5   -63196.33
                                    T83 |  -87335.65   12260.16    -7.12   0.000    -111365.3      -63306
                                    T84 |  -86950.26   12272.68    -7.08   0.000    -111004.5   -62896.07
                                    T85 |  -87450.63   12114.49    -7.22   0.000    -111194.8   -63706.48
                                    T86 |   -87667.8   12111.73    -7.24   0.000    -111406.5   -63929.06
                                    T87 |  -87576.92   12083.11    -7.25   0.000    -111259.6   -63894.29
                                    T88 |  -87591.69   12097.41    -7.24   0.000    -111302.4   -63881.01
                                    T89 |  -87807.28   12107.23    -7.25   0.000    -111537.2   -64077.36
                                    T90 |  -87255.05    12097.6    -7.21   0.000    -110966.1   -63543.99
                                    T91 |  -87775.91    12095.6    -7.26   0.000      -111483   -64068.79
                                    T92 |   -87762.1   12105.71    -7.25   0.000      -111489   -64035.15
                                    T93 |  -87823.66   12097.35    -7.26   0.000    -111534.2   -64113.11
                                    T94 |  -87816.71    12102.8    -7.26   0.000      -111538   -64095.47
                                    T95 |   -87403.6   12077.13    -7.24   0.000    -111074.5   -63732.67
                                    T96 |  -87046.71    12061.6    -7.22   0.000    -110687.2   -63406.23
                                    T97 |   -86403.4   11870.06    -7.28   0.000    -109668.5   -63138.34
                                    T98 |  -86587.83   11854.81    -7.30   0.000      -109823   -63352.66
                                    T99 |  -86643.57    11828.6    -7.32   0.000    -109827.4   -63459.76
                                   T100 |   -86706.4   11847.56    -7.32   0.000    -109927.4   -63485.43
                                   T101 |  -86558.79   11829.91    -7.32   0.000    -109745.2   -63372.41
                                   T102 |   -86119.7   11839.85    -7.27   0.000    -109325.6   -62913.85
                                   T103 |  -86816.72   11835.25    -7.34   0.000    -110013.6   -63619.87
                                   T104 |  -86572.79   11809.83    -7.33   0.000    -109719.8   -63425.76
                                   T105 |  -86747.71   11802.98    -7.35   0.000    -109881.3   -63614.12
                                   T106 |   -86818.2   11820.36    -7.34   0.000    -109985.9   -63650.55
                                   T107 |  -86917.79   11807.83    -7.36   0.000    -110060.9    -63774.7
                                   T108 |  -86070.39   11795.19    -7.30   0.000    -109188.7   -62952.06
                                   T109 |  -88450.59   11391.48    -7.76   0.000    -110777.7   -66123.53
                                   T110 |  -88526.55   11368.91    -7.79   0.000    -110809.4   -66243.73
                                   T111 |  -88376.09   11308.29    -7.82   0.000    -110540.1   -66212.07
                                   T112 |  -88373.14   11330.77    -7.80   0.000    -110581.2   -66165.08
                                   T113 |  -88735.21   11371.15    -7.80   0.000    -111022.4   -66447.99
                                   T114 |  -88047.93   11364.98    -7.75   0.000    -110323.1   -65772.81
                                   T115 |  -88721.85    11369.4    -7.80   0.000    -111005.6   -66438.06
                                   T116 |  -88678.91   11380.12    -7.79   0.000    -110983.7   -66374.11
                                   T117 |  -88762.76   11388.22    -7.79   0.000    -111083.4   -66442.08
                                   T118 |  -88934.65   11397.82    -7.80   0.000    -111274.1   -66595.17
                                   T119 |  -88926.66   11391.17    -7.81   0.000    -111253.1    -66600.2
                                   T120 |  -87957.17   11387.73    -7.72   0.000    -110276.9   -65637.46
                                   T121 |  -89739.26   11114.07    -8.07   0.000    -111522.6   -67955.92
                                   T122 |  -89828.94   11052.07    -8.13   0.000    -111490.8   -68167.12
                                   T123 |   -89937.6   11080.82    -8.12   0.000    -111655.8   -68219.43
                                   T124 |  -89989.31   11098.37    -8.11   0.000    -111741.9   -68236.75
                                   T125 |   -89972.1   11076.38    -8.12   0.000    -111681.6   -68262.63
                                   T126 |  -89021.02   11052.46    -8.05   0.000    -110683.6   -67358.42
                                   T127 |  -89720.41   11048.05    -8.12   0.000    -111374.3   -68066.47
                                   T128 |  -89874.63   11039.06    -8.14   0.000      -111511    -68238.3
                                   T129 |  -89812.66   11032.62    -8.14   0.000    -111436.4   -68188.95
                                   T130 |  -89823.17   11022.95    -8.15   0.000    -111427.9   -68218.42
                                   T131 |  -89957.22   11015.64    -8.17   0.000    -111547.6    -68366.8
                                   T132 |  -88900.67   11021.19    -8.07   0.000      -110502   -67299.36
                                   T133 |  -93912.95   11333.43    -8.29   0.000    -116126.2   -71699.67
                                   T134 |  -93999.52   11305.47    -8.31   0.000      -116158   -71841.04
                                   T135 |  -93729.72   11243.35    -8.34   0.000    -115766.4      -71693
                                   T136 |   -94047.4   11295.17    -8.33   0.000    -116185.7   -71909.09
                                   T137 |  -93871.96   11302.34    -8.31   0.000    -116024.3   -71719.62
                                   T138 |  -93112.01   11334.28    -8.22   0.000      -115327   -70897.05
                                   T139 |     -94187   11365.37    -8.29   0.000    -116462.9   -71911.11
                                   T140 |  -94195.18   11346.43    -8.30   0.000    -116433.9   -71956.41
                                   T141 |  -94149.56   11363.91    -8.28   0.000    -116422.6   -71876.54
                                   T142 |  -93984.42   11320.47    -8.30   0.000    -116172.3   -71796.54
                                   T143 |   -93710.5    11279.1    -8.31   0.000    -115817.3    -71603.7
                                   T144 |  -92863.05   11325.92    -8.20   0.000    -115061.6   -70664.48
                                   T145 |  -99555.87   11620.19    -8.57   0.000    -122331.2   -76780.54
                                   T146 |  -99591.76   11560.09    -8.62   0.000    -122249.3   -76934.22
                                   T147 |  -99094.61   11457.82    -8.65   0.000    -121551.7   -76637.51
                                   T148 |  -99066.83   11439.07    -8.66   0.000    -121487.2   -76646.48
                                   T149 |  -99017.06   11480.06    -8.63   0.000    -121517.7   -76516.39
                                   T150 |  -98025.84   11504.82    -8.52   0.000      -120575   -75476.64
                                   T151 |  -99390.59   11496.65    -8.65   0.000    -121923.8   -76857.39
                                   T152 |  -99357.58    11532.2    -8.62   0.000    -121960.4   -76754.72
                                   T153 |  -99217.52   11545.31    -8.59   0.000    -121846.1   -76588.96
                                   T154 |  -98989.48   11486.15    -8.62   0.000    -121502.1   -76476.87
                                   T155 |  -99341.93   11512.32    -8.63   0.000    -121905.8   -76778.02
                                   T156 |     -97737   11526.44    -8.48   0.000    -120328.6   -75145.42
                                   T157 |  -107265.6   13950.24    -7.69   0.000    -134607.8   -79923.48
                                   T158 |  -107861.6   14025.35    -7.69   0.000      -135351   -80372.17
                                   T159 |    -108016   14025.22    -7.70   0.000    -135505.2   -80526.91
                                   T160 |  -107745.1   14071.32    -7.66   0.000    -135324.5   -80165.57
                                   T161 |  -107853.4   14078.61    -7.66   0.000    -135447.2   -80259.65
                                   T162 |  -106590.6   14088.99    -7.57   0.000    -134204.7   -78976.48
                                   T163 |  -108193.8   14086.17    -7.68   0.000    -135802.4   -80585.15
                                   T164 |    -108015   14148.87    -7.63   0.000    -135746.5   -80283.51
                                   T165 |  -107963.3   14138.68    -7.64   0.000    -135674.8   -80251.83
                                   T166 |  -107936.7   14131.95    -7.64   0.000    -135635.1   -80238.41
                                   T167 |  -108261.1    14142.3    -7.66   0.000    -135979.7   -80542.49
                                   T168 |  -105636.3   14195.72    -7.44   0.000    -133459.6   -77812.95
                                   T169 |  -93633.37    19695.2    -4.75   0.000    -132235.6   -55031.19
                                   T170 |  -93481.07   19472.04    -4.80   0.000    -131645.9   -55316.27
                                   T171 |  -93594.04   19439.17    -4.81   0.000    -131694.4   -55493.68
                                   T172 |  -93566.47   19587.41    -4.78   0.000    -131957.4   -55175.56
                                   T173 |  -93682.96   19531.85    -4.80   0.000      -131965   -55400.94
                                   T174 |   -91326.2   19523.16    -4.68   0.000    -129591.2   -53061.22
                                   T175 |  -93071.36   19702.18    -4.72   0.000    -131687.2   -54455.49
                                   T176 |  -93436.51   19745.26    -4.73   0.000    -132136.8   -54736.21
                                   T177 |  -93298.93   19766.68    -4.72   0.000    -132041.2   -54556.65
                                   T178 |  -93421.07   19814.54    -4.71   0.000    -132257.2   -54584.98
                                   T179 |  -93447.24   19824.99    -4.71   0.000    -132303.8   -54590.69
                                   T180 |  -90925.99   19789.41    -4.59   0.000    -129712.8   -52139.17
                                   T181 |  -87946.06   13490.56    -6.52   0.000    -114387.3   -61504.84
                                   T182 |  -88375.41   13381.33    -6.60   0.000    -114602.5   -62148.28
                                   T183 |  -87545.91   13340.53    -6.56   0.000    -113693.1   -61398.74
                                   T184 |  -88236.61   13237.82    -6.67   0.000    -114182.5   -62290.76
                                   T185 |  -87686.25   13268.27    -6.61   0.000    -113691.8   -61680.72
                                   T186 |  -84607.08   13300.45    -6.36   0.000    -110675.7   -58538.47
                                   T187 |  -87243.93   13326.01    -6.55   0.000    -113362.6   -61125.23
                                   T188 |  -87623.29   13383.07    -6.55   0.000    -113853.8   -61392.76
                                   T189 |  -87718.65   13354.37    -6.57   0.000    -113892.9   -61544.36
                                   T190 |  -87553.98   13348.51    -6.56   0.000    -113716.8   -61391.19
                                   T191 |   -87668.7   13367.93    -6.56   0.000    -113869.6   -61467.83
                                   T192 |  -84357.64   13401.93    -6.29   0.000    -110625.1   -58090.14
                                   T193 |  -83758.03   11459.55    -7.31   0.000    -106218.5   -61297.55
                                   T194 |  -83657.84   11424.98    -7.32   0.000    -106050.6   -61265.12
                                   T195 |     -83609   11442.15    -7.31   0.000    -106035.4   -61182.63
                                   T196 |  -84137.03   11451.48    -7.35   0.000    -106581.7   -61692.36
                                   T197 |  -83368.77      11407    -7.31   0.000    -105726.3   -61011.29
                                   T198 |  -79514.35   11431.83    -6.96   0.000    -101920.5   -57108.21
                                   T199 |  -83425.42   11443.44    -7.29   0.000    -105854.3   -60996.52
                                   T200 |  -83119.38   11447.57    -7.26   0.000    -105556.4   -60682.38
                                   T201 |   -83273.8   11507.15    -7.24   0.000    -105827.6   -60720.03
                                   T202 |   -82938.7   11506.17    -7.21   0.000    -105490.6   -60386.84
                                   T203 |  -83080.54   11467.83    -7.24   0.000    -105557.2   -60603.84
                                   T204 |  -79128.29   11473.55    -6.90   0.000    -101616.2   -56640.38
                                   T205 |  -83360.27   11188.54    -7.45   0.000    -105289.6   -61430.97
                                   T206 |  -83547.04   11154.84    -7.49   0.000    -105410.3   -61683.78
                                   T207 |  -83332.75   11071.14    -7.53   0.000      -105032   -61633.54
                                   T208 |  -83352.78   11159.09    -7.47   0.000    -105224.4   -61481.19
                                   T209 |   -82517.1   11219.35    -7.35   0.000    -104506.8   -60527.41
                                   T210 |   -78510.4   11248.12    -6.98   0.000    -100556.5   -56464.32
                                   T211 |  -82617.56   11252.29    -7.34   0.000    -104671.8   -60563.31
                                   T212 |  -82433.74   11245.24    -7.33   0.000    -104474.2    -60393.3
                                   T213 |  -82604.34   11246.96    -7.34   0.000    -104648.2   -60560.52
                                   T214 |  -82141.89    11204.8    -7.33   0.000    -104103.1    -60180.7
                                   T215 |   -82894.8   11256.27    -7.36   0.000    -104956.9   -60832.74
                                   T216 |   -77312.4   11245.73    -6.87   0.000     -99353.8      -55271
                                   T217 |  -83807.51   10548.13    -7.95   0.000    -104481.6    -63133.4
                                   T218 |  -84803.42    10563.4    -8.03   0.000    -105507.5   -64099.38
                                   T219 |  -83399.03    10571.7    -7.89   0.000    -104119.3   -62678.72
                                   T220 |  -81687.87   10604.06    -7.70   0.000    -102471.6   -60904.13
                                   T221 |  -81584.35   10612.06    -7.69   0.000    -102383.8   -60784.94
                                   T222 |  -77412.54    10659.7    -7.26   0.000    -98305.34   -56519.74
                                   T223 |  -82538.17   10672.21    -7.73   0.000    -103455.5   -61620.86
                                   T224 |  -81542.91   10706.31    -7.62   0.000    -102527.1   -60558.77
                                   T225 |  -80876.61   10695.87    -7.56   0.000    -101840.3   -59912.91
                                   T226 |  -81523.55   10737.68    -7.59   0.000    -102569.2   -60477.93
                                   T227 |  -81280.32   10759.65    -7.55   0.000      -102369   -60191.63
                                   T228 |   -74303.2   10785.55    -6.89   0.000    -95442.65   -53163.75
                                   T229 |  -84088.33   10064.48    -8.35   0.000    -103814.5   -64362.17
                                   T230 |  -82093.82   10059.04    -8.16   0.000    -101809.3   -62378.32
                                   T231 |  -82208.23   10090.04    -8.15   0.000    -101984.5   -62431.95
                                   T232 |  -85192.06   10090.13    -8.44   0.000    -104968.5   -65415.61
                                   T233 |  -83188.23   10102.53    -8.23   0.000      -102989   -63387.49
                                   T234 |   -72970.2   10120.37    -7.21   0.000    -92805.91    -53134.5
                                   T235 |  -83371.89   10141.39    -8.22   0.000    -103248.8   -63494.97
                                   T236 |  -82654.52   10175.63    -8.12   0.000    -102598.6   -62710.49
                                   T237 |  -83001.02   10187.11    -8.15   0.000    -102967.5   -63034.51
                                   T238 |  -82687.77   10164.77    -8.13   0.000    -102610.5   -62765.04
                                   T239 |  -82397.05   10153.82    -8.11   0.000    -102298.3   -62495.77
                                   T240 |  -73684.16   10156.87    -7.25   0.000     -93591.4   -53776.91
                                   T241 |  -85944.52   9253.666    -9.29   0.000    -104081.5   -67807.53
                                   T242 |  -83939.45    9251.04    -9.07   0.000    -102071.3    -65807.6
                                   T243 |  -86405.86   9257.415    -9.33   0.000    -104550.2   -68261.52
                                   T244 |  -86722.01   9288.863    -9.34   0.000      -104928   -68516.03
                                   T245 |  -83036.97   9290.844    -8.94   0.000    -101246.8   -64827.11
                                   T246 |  -74028.73   9318.769    -7.94   0.000    -92293.33   -55764.14
                                   T247 |   -83402.8   9306.743    -8.96   0.000    -101643.8   -65161.77
                                   T248 |  -81620.21   9318.912    -8.76   0.000    -99885.09   -63355.34
                                   T249 |  -83264.64   9335.612    -8.92   0.000    -101562.2   -64967.04
                                   T250 |  -82524.34   9331.203    -8.84   0.000    -100813.3   -64235.38
                                   T251 |  -82262.37   9350.761    -8.80   0.000    -100589.7   -63935.08
                                   T252 |  -68850.14   9384.051    -7.34   0.000    -87242.68    -50457.6
                                   T253 |  -85824.22   8529.879   -10.06   0.000    -102542.6   -69105.83
                                   T254 |  -87823.43   8537.961   -10.29   0.000    -104557.7    -71089.2
                                   T255 |  -85086.82   8508.265   -10.00   0.000    -101762.8   -68410.79
                                   T256 |  -88118.42    8517.71   -10.35   0.000      -104813   -71423.88
                                   T257 |  -85284.54   8526.436   -10.00   0.000    -101996.2    -68572.9
                                   T258 |  -72113.07   8527.825    -8.46   0.000    -88827.43   -55398.71
                                   T259 |  -84092.27   8550.891    -9.83   0.000    -100851.8    -67332.7
                                   T260 |  -82508.08   8546.963    -9.65   0.000    -99259.94   -65756.21
                                   T261 |   -81321.5   8556.332    -9.50   0.000    -98091.73   -64551.26
                                   T262 |  -83438.64   8543.235    -9.77   0.000    -100183.2   -66694.07
                                   T263 |   -82693.7   8559.305    -9.66   0.000    -99469.76   -65917.65
                                   T264 |  -69896.75     8558.7    -8.17   0.000    -86671.62   -53121.88
                                   T265 |  -87291.79   8041.436   -10.86   0.000    -103052.8   -71530.74
                                   T266 |  -89065.77   8057.139   -11.05   0.000    -104857.6   -73273.95
                                   T267 |  -84998.22   8049.522   -10.56   0.000    -100775.1   -69221.32
                                   T268 |  -87409.28   8062.466   -10.84   0.000    -103211.5   -71607.01
                                   T269 |  -85723.81   8060.756   -10.63   0.000    -101522.7    -69924.9
                                   T270 |  -69553.04   8108.202    -8.58   0.000    -85444.95   -53661.14
                                   T271 |  -86301.81   8119.323   -10.63   0.000    -102215.5    -70388.1
                                   T272 |  -81639.78    8133.14   -10.04   0.000    -97580.56      -65699
                                   T273 |   -82341.2   8154.819   -10.10   0.000    -98324.48   -66357.93
                                   T274 |  -81111.55   8168.686    -9.93   0.000       -97122    -65101.1
                                   T275 |  -72208.04    8191.08    -8.82   0.000    -88262.39    -56153.7
                                   T276 |  -58815.13   8195.346    -7.18   0.000    -74877.84   -42752.42
                                   T277 |  -74494.45   8107.475    -9.19   0.000    -90384.93   -58603.97
                                   T278 |   -86645.4   8113.053   -10.68   0.000    -102546.8   -70743.98
                                   T279 |  -81344.42   8110.934   -10.03   0.000    -97241.68   -65447.16
                                   T280 |   -84093.9   8115.914   -10.36   0.000    -100000.9   -68186.88
                                   T281 |  -72347.34   8105.193    -8.93   0.000    -88233.35   -56461.33
                                   T282 |  -57353.79   8116.601    -7.07   0.000    -73262.15   -41445.42
                                   T283 |  -82622.66   8139.159   -10.15   0.000    -98575.24   -66670.08
                                   T284 |     -72129    8174.54    -8.82   0.000    -88150.93   -56107.08
                                   T285 |  -79780.73   8185.855    -9.75   0.000    -95824.83   -63736.62
                                   T286 |  -71340.74   8190.548    -8.71   0.000    -87394.05   -55287.44
                                   T287 |  -74063.63   8196.248    -9.04   0.000    -90128.11   -57999.16
                                   T288 |  -47219.42   8191.271    -5.76   0.000    -63274.14    -31164.7
                                   T289 |  -94030.48   8541.265   -11.01   0.000    -110771.2   -77289.78
                                   T290 |   -92717.5   8547.468   -10.85   0.000    -109470.4   -75964.64
                                   T291 |  -93063.83   8560.279   -10.87   0.000    -109841.8   -76285.86
                                   T292 |  -84004.14    8545.56    -9.83   0.000    -100753.3   -67255.02
                                   T293 |  -95439.39   8590.125   -11.11   0.000    -112275.9   -78602.93
                                   T294 |  -66468.77   8633.867    -7.70   0.000    -83390.97   -49546.57
                                   T295 |  -93566.36   8619.776   -10.85   0.000    -110460.9   -76671.77
                                   T296 |  -82232.17    8646.38    -9.51   0.000     -99178.9   -65285.45
                                   T297 |  -62122.73   8658.162    -7.18   0.000    -79092.54   -45152.91
                                   T298 |  -83468.36   8665.067    -9.63   0.000    -100451.7   -66485.01
                                   T299 |  -74447.98    8673.64    -8.58   0.000    -91448.13   -57447.83
                                   T300 |  -53365.96   8650.298    -6.17   0.000    -70320.36   -36411.55
                                   T301 |  -131095.2   4728.245   -27.73   0.000    -140362.4   -121827.9
                                   T302 |  -133047.4   4718.417   -28.20   0.000    -142295.4   -123799.4
                                   T303 |  -112620.2   4718.471   -23.87   0.000    -121868.3   -103372.1
                                   T304 |  -123902.8   4730.844   -26.19   0.000    -133175.1   -114630.4
                                   T305 |  -112300.4    4747.45   -23.65   0.000    -121605.3   -102995.5
                                   T306 |  -64900.95   4754.179   -13.65   0.000    -74219.04   -55582.86
                                   T307 |  -102973.4   4768.161   -21.60   0.000    -112318.9    -93627.9
                                   T308 |   -91678.2   4775.287   -19.20   0.000    -101037.7   -82318.74
                                   T309 |  -99421.58   4789.813   -20.76   0.000    -108809.5   -90033.65
                                   T310 |  -59760.09   4789.822   -12.48   0.000    -69148.04   -50372.14
                                   T311 |  -88673.07   4804.762   -18.46   0.000     -98090.3   -79255.83
                                   T312 |          0  (omitted)
                                        |
                          ano#c.lambda2 |
                                  1996  |   8308.035   4431.099     1.87   0.061    -376.8255     16992.9
                                  1997  |   8325.719   4580.415     1.82   0.069    -651.7993    17303.24
                                  1998  |   11442.68   5571.867     2.05   0.040     521.9338    22363.42
                                  1999  |   13837.27   6168.609     2.24   0.025     1746.922    25927.61
                                  2000  |   6933.544   4128.521     1.68   0.093    -1158.272    15025.36
                                  2001  |   7785.554   4150.549     1.88   0.061    -349.4352    15920.54
                                  2002  |   8865.173   5122.917     1.73   0.084    -1175.637    18905.98
                                  2003  |   8578.217   5808.908     1.48   0.140    -2807.122    19963.56
                                  2004  |   7110.878   6151.933     1.16   0.248    -4946.781    19168.54
                                  2005  |   8566.147   6129.407     1.40   0.162    -3447.362    20579.66
                                  2006  |   9288.101   6678.788     1.39   0.164    -3802.183    22378.39
                                  2007  |   13334.95   8241.516     1.62   0.106    -2818.244    29488.15
                                  2008  |   19021.19   8982.202     2.12   0.034     1416.265    36626.12
                                  2009  |   27341.66   12446.92     2.20   0.028      2945.96    51737.36
                                  2010  |   11313.17   17933.67     0.63   0.528    -23836.44    46462.79
                                  2011  |   5724.454    10173.4     0.56   0.574     -14215.2    25664.11
                                  2012  |   1730.228    7556.79     0.23   0.819    -13080.92    16541.38
                                  2013  |   2369.428   7440.617     0.32   0.750    -12214.03    16952.88
                                  2014  |   4256.105   6788.612     0.63   0.531    -9049.432    17561.64
                                  2015  |   7268.482   6205.169     1.17   0.241    -4893.521    19430.48
                                  2016  |    10725.2   5262.085     2.04   0.042     411.6199    21038.77
                                  2017  |   16933.59   4296.125     3.94   0.000     8513.278    25353.91
                                  2018  |   22416.73   3698.035     6.06   0.000     15168.66     29664.8
                                  2019  |   29043.29   3708.742     7.83   0.000     21774.24    36312.35
                                  2020  |   49353.79   4301.365    11.47   0.000     40923.21    57784.38
                                  2021  |   92994.24   4223.575    22.02   0.000     84716.12    101272.4
                                        |
                                  _cons |   44232.14   10754.98     4.11   0.000     23152.61    65311.67
                          -------------------------------------------------------------------------------

                          Comment


                          • #28
                            The problem I have is that when I try to predict income based on the previous model, it generates negative values.
                            Do you think this may be due to the model specification or some methodological error when doing the heckman manually?

                            Thank you very much for all your help!

                            Comment

                            Working...
                            X