Announcement

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

  • Heckman two step model

    Dear Stata Users,

    I am attempting to apply the two step Heckman model, with a Tobit regression as first stage instead of a probit model.

    I am proceeding in this way:

    a) Tobit model


    b) estimation of inverse Mill's ratio (IMR)

    command:
    predict phat, xb gen mills = exp(-.5*phat2)/(sqrt(2*_pi)*normprob(phat))




    c) estimation of a OLS model, including the IMR as additional indep. variable.

    My problem is that the OLS model (c) omits the IMR because of multicollinearity.



    Code:
     reg SHROA_5w_100 RepTrak Td_TE_100 logTA Int_TA_100 Bsize IndBoard_100 Y1 Y2 Y3 Y4 Y5 Sector1 Sector2 Sector3 Sector4 Sector5
    > Country1-Country18 GDPperCapita millsTobit
    note: Y5 omitted because of collinearity
    note: Sector2 omitted because of collinearity
    note: Country1 omitted because of collinearity
    note: Country17 omitted because of collinearity
    note: millsTobit omitted because of collinearity
    
          Source |       SS           df       MS      Number of obs   =       372
    -------------+----------------------------------   F(31, 340)      =      2.20
           Model |  .148992991        31  .004806226   Prob > F        =    0.0004
        Residual |  .741759968       340  .002181647   R-squared       =    0.1673
    -------------+----------------------------------   Adj R-squared   =    0.0913
           Total |  .890752959       371  .002400951   Root MSE        =    .04671
    
    ------------------------------------------------------------------------------
    SHROA_5w_100 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         RepTrak |   .0034099    .001144     2.98   0.003     .0011597    .0056602
       Td_TE_100 |   .0002304   .0006909     0.33   0.739    -.0011286    .0015894
           logTA |  -.0004981   .0026906    -0.19   0.853    -.0057905    .0047943
      Int_TA_100 |  -.0877178   .0709171    -1.24   0.217    -.2272094    .0517738
           Bsize |   .0018275   .0011427     1.60   0.111    -.0004203    .0040752
    IndBoard_100 |  -.0083301   .0130468    -0.64   0.524    -.0339926    .0173324
              Y1 |   .0159247   .0116517     1.37   0.173    -.0069937    .0388432
              Y2 |   .0227221   .0110277     2.06   0.040      .001031    .0444133
              Y3 |   .0134447   .0107067     1.26   0.210    -.0076151    .0345045
              Y4 |   .0148655   .0097597     1.52   0.129    -.0043316    .0340625
              Y5 |          0  (omitted)
         Sector1 |  -.0102441   .0089178    -1.15   0.251    -.0277851    .0072969
         Sector2 |          0  (omitted)
         Sector3 |  -.0251224   .0119066    -2.11   0.036    -.0485423   -.0017025
         Sector4 |  -.0134131   .0096315    -1.39   0.165    -.0323578    .0055317
         Sector5 |  -.0138872   .0095445    -1.46   0.147    -.0326609    .0048864
        Country1 |          0  (omitted)
        Country2 |  -.0610968   .0561138    -1.09   0.277    -.1714708    .0492771
        Country3 |   .0409602   .0433195     0.95   0.345    -.0442478    .1261682
        Country4 |  -.0117026   .0440055    -0.27   0.790    -.0982599    .0748547
        Country5 |    .004747    .043461     0.11   0.913    -.0807393    .0902334
        Country6 |   -.045664    .048471    -0.94   0.347    -.1410048    .0496767
        Country7 |  -.0395118   .0453174    -0.87   0.384    -.1286495    .0496259
        Country8 |  -.0332612   .0453622    -0.73   0.464    -.1224872    .0559648
        Country9 |   -.023308   .0556034    -0.42   0.675     -.132678    .0860621
       Country10 |  -.1146152   .0853866    -1.34   0.180    -.2825678    .0533373
       Country11 |  -.0867431   .0551996    -1.57   0.117    -.1953188    .0218326
       Country12 |  -.0452769   .0468803    -0.97   0.335    -.1374888     .046935
       Country13 |  -.0280531   .0576583    -0.49   0.627     -.141465    .0853588
       Country14 |   .0182435   .0413212     0.44   0.659    -.0630338    .0995208
       Country15 |  -.0219888   .0383947    -0.57   0.567    -.0975098    .0535321
       Country16 |  -.0157429    .047691    -0.33   0.742    -.1095494    .0780636
       Country17 |          0  (omitted)
       Country18 |   .0167567   .0355765     0.47   0.638     -.053221    .0867345
    GDPperCapita |  -1.95e-06   1.09e-06    -1.79   0.075    -4.10e-06    1.96e-07
      millsTobit |          0  (omitted)
           _cons |  -.0921997   .1135825    -0.81   0.418    -.3156125    .1312131
    ------------------------------------------------------------------------------

    I have also attempted to run a model with IMR as unique indep. v., but i get the same result:





    Code:
    reg SHROA_5w_100 millsTobit
    note: millsTobit omitted because of collinearity
    
    Source | SS df MS Number of obs = 454
    -------------+---------------------------------- F(0, 453) = 0.00
    Model | 0 0 . Prob > F = .
    Residual | 1.04345408 453 .002303431 R-squared = 0.0000
    -------------+---------------------------------- Adj R-squared = 0.0000
    Total | 1.04345408 453 .002303431 Root MSE = .04799
    
    ------------------------------------------------------------------------------
    SHROA_5w_100 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    millsTobit | 0 (omitted)
    _cons | .0481006 .0022525 21.35 0.000 .043674 .0525272
    ------------------------------------------------------------------------------
    .



    Any suggestions would be really appreciated.


    Thank you in advance
    Last edited by Nicola Rossi; 19 Feb 2019, 07:49.

  • #2
    Hi Nicola
    Two points on your post. First, next time you provide some output be sure to use the "code wrappers"
    If you write anything between the [ CODE ] and [ /CODE ] (omit the spaces), the output there will come well formatted and readable.
    Second, if you have stata 15, there is the command eregress, which has the "tobitselect" option
    Third, if you still want to do it manually, you can create the Mills ratio using the score option
    Code:
    tobit y x, ll(0) 
    predict mill_tobit, score
    If you do the latter, you will need to correct the standard errors.
    HTH
    Fernando

    Comment

    Working...
    X