Announcement

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

  • Heckpoisson error - could not be evaluated

    Dear Stata Users,

    I am trying to fit a Poisson model correcting for Sample selection using the heckpoisson command in Stata 17.0. I have a cross-sectional dataset for EU firms participating in meetings with the European Commission.

    My dependent variable is the number of meetings held (meet) and the selection dependent variable is a dummy variable capturing whether any meeting was held for the specific firm (meet_d).

    My explanatory variables include a dummy variable indicating whether a firm is in the top 2500 R&D firms (toprd_firm), a dummy variable indicating whether a firm has received an EU grant (grant) and the log of mean turnover approximating firm size (lmean_turn_m)

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float i_lobby int meet float(meet_d toprd_firm grant lmean_turn_m)
    2034  1 1 0 0         .
     501  0 0 1 0         .
    1402  3 1 0 0         .
    2389  0 0 0 0         .
    1552 14 1 0 0 15.396323
     206  2 1 0 1 13.301535
     600  0 0 0 0  10.76539
    2409  . 0 0 0         .
    2251  0 0 0 0  9.528091
    1349  0 0 1 0 10.567322
    2307  0 0 0 1 13.585784
    2154  0 0 0 0  12.94011
    1242  0 0 0 1 11.215186
    1751 25 1 0 0         .
     565  0 0 0 0         .
    end
    label values grant g
    label def g 0 "No Grant", modify
    label def g 1 "Grant Receiver", modify



    Typing the command:
    Code:
    # delimit ;
    heckpoisson meet toprd_firm grant  lmean_turn_m i.cnt i.nace2, iter(100)
    select(meet_d = toprd_firm lmean_turn_m);
    I get
    Code:
    initial:       log likelihood =     -<inf>  (could not be evaluated)
    could not find feasible values
    Changing the maximizing method or using the difficult option does not help.

    Fitting a Poisson model works fine and so does a Heckman model with the same variables, however given that my dependent variable is count it is not the appropriate way to go.

  • #2
    Kostas:
    from your example, the most complete viable code is:
    Code:
    . heckpoisson meet toprd_firm grant  lmean_turn_m  , iter(100) select(meet_d = toprd_firm lmean_turn_m)
    that gives me back, after -convergence not achieved- warning:
    Code:
    Poisson regression with endogenous selection    Number of obs     =          8
    (25 quadrature points)                                Selected    =          2
                                                          Nonselected =          6
    
                                                    Wald chi2(2)      =      14.69
    Log likelihood = -8.336869                      Prob > chi2       =     0.0006
    
    ------------------------------------------------------------------------------
            meet | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    meet         |
      toprd_firm |          0  (omitted)
           grant |  -1.754673   .7451533    -2.35   0.019    -3.215147   -.2941995
    lmean_turn_m |   .0912881   .0272873     3.35   0.001     .0378058    .1447703
           _cons |   1.233498          .        .       .            .           .
    -------------+----------------------------------------------------------------
    meet_d       |
      toprd_firm |  -.0018127          .        .       .            .           .
    lmean_turn_m |  -.0002323          .        .       .            .           .
           _cons |   -.002639          .        .       .            .           .
    -------------+----------------------------------------------------------------
         /athrho |   9.235314          .        .       .            .           .
        /lnsigma |  -9.713146   5221.761    -0.00   0.999    -10244.18    10224.75
    -------------+----------------------------------------------------------------
             rho |          1          .                            -1           1
           sigma |   .0000605   .3158284                             0           .
    ------------------------------------------------------------------------------
    Wald test of indep. eqns. (rho = 0): chi2(1) =        .   Prob > chi2 =      .
    Warning: Convergence not achieved.
    
    ..
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your prompt reply Carlo

      The fact that I am not getting the output has to do with adjusting Stata memory?

      Comment


      • #4
        Kostas:
        my gut-feeling tells me that -intpoints(#)- option should be considered.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thank you Carlo

          Playing around with the inpoints(#) option does not yield results

          However, removing industry fixed effects (i.nace2) does the trick

          It's not ideal, however the world is almost always second best

          Comment

          Working...
          X