Announcement

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

  • hplogit hurdle models and neg IRRs with Poisson second step

    Hello all, I am attempting to run a 2-step hurdle model using count data. My basic model is simply

    xi: hplogit nonzerodzbtw_dx_inptcmo_max365 majorshrt moderateshrt, exposure(expintrvl365d) irr robust. My dependent variable is coded as zero if a patient did not receive treatment and 1 to 365 days if a patient did receive treatment, based upon days elapsed between diagnosis and treatment. Just over 1/2 of the sample did not receive treatment. When I run this model, I am getting negative values for my IRRs in the second stage Poisson component. When I add additional covariates, some are positive and some negative. My understanding is an IRR cannot be negative. Does anyone know why this might be happening? I have tried running with and without the exposure expression and same scenario replicates. Also, while the output on the screen states IRR for both logit and Poisson components, is the macro actually reporting odds ratios for the logit first step?

    Thanks an advance to anyone who might be able to support. Nancy

  • #2
    Welcome to Statalist.

    I assume you are using Joseph Hilbe's hplogit program, available from SSC. If not then be clear as to where you got the program.

    As for the rest of your Q, it would help to see code and output. Use code tags. See pt 12 of the FAQ.

    Sometimes people are just misreading their output, but without seeing it it is hard to say.

    hplogit probably does not support factor variables. Nonetheless i am not sure why your command as written uses the xi: prefix.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Going through my notes I remembered that there is a bug in hplogit and hnblogit. You can either tweak their code or use the eret2 command (available from SSC) to fix it. Instead of getting IRRs, the program is giving you unexponentiated coefficients.

      Code:
      . use http://www3.nd.edu/~rwilliam/statafiles/couart4.dta, clear
      (couart4.dta | Long data on Ph.D. biochemists | 2014-04-24)
      
      . hplogit  art female married kid5 phd mentor, nolog robust irr
      
      Poisson-Logit Hurdle Regression                 Number of obs     =        915
                                                      Wald chi2(5)      =      43.84
      Log pseudolikelihood = -1605.3117               Prob > chi2       =     0.0000
      
      ------------------------------------------------------------------------------
                   |               Robust
                   |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      logit        |
            female |   .7779048   .1215446    -1.61   0.108     .5727031    1.056631
           married |   1.385739   .2475798     1.83   0.068     .9763455    1.966796
              kid5 |   .7518272   .0831787    -2.58   0.010     .6052643      .93388
               phd |   1.022468   .0822485     0.28   0.782     .8733296    1.197075
            mentor |   1.083419   .0154716     5.61   0.000     1.053515    1.114171
             _cons |   1.267183   .3694753     0.81   0.417     .7155706    2.244016
      -------------+----------------------------------------------------------------
      poisson      |
            female |  -.2285826   .0822579    -2.78   0.005    -.3898052     -.06736
           married |    .096485   .0942537     1.02   0.306    -.0882489    .2812188
              kid5 |  -.1421872    .068173    -2.09   0.037    -.2758038   -.0085707
               phd |  -.0127266   .0505056    -0.25   0.801    -.1117157    .0862626
            mentor |   .0187455   .0042451     4.42   0.000     .0104252    .0270658
             _cons |   .6711393   .1738314     3.86   0.000      .330436    1.011843
      ------------------------------------------------------------------------------
      AIC Statistic =     3.522
      
      . eret2 scalar k_eform = 3, replace
      
      . ml display, irr
      
      Poisson-Logit Hurdle Regression                 Number of obs     =        915
                                                      Wald chi2(5)      =      43.84
      Log pseudolikelihood = -1605.3117               Prob > chi2       =     0.0000
      
      ------------------------------------------------------------------------------
                   |               Robust
                   |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      logit        |
            female |   .7779048   .1215446    -1.61   0.108     .5727031    1.056631
           married |   1.385739   .2475798     1.83   0.068     .9763455    1.966796
              kid5 |   .7518272   .0831787    -2.58   0.010     .6052643      .93388
               phd |   1.022468   .0822485     0.28   0.782     .8733296    1.197075
            mentor |   1.083419   .0154716     5.61   0.000     1.053515    1.114171
             _cons |   1.267183   .3694753     0.81   0.417     .7155706    2.244016
      -------------+----------------------------------------------------------------
      poisson      |
            female |   .7956606   .0654494    -2.78   0.005     .6771888    .9348586
           married |   1.101293    .103801     1.02   0.306      .915533    1.324743
              kid5 |   .8674588   .0591373    -2.09   0.037     .7589618     .991466
               phd |   .9873541   .0498669    -0.25   0.801     .8942985    1.090093
            mentor |   1.018922   .0043255     4.42   0.000      1.01048    1.027435
             _cons |   1.956465   .3400951     3.86   0.000     1.391575    2.750665
      ------------------------------------------------------------------------------
      
      .
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 19.5 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://www3.nd.edu/~rwilliam

      Comment


      • #4
        Thanks much, most appreciative. And yes, using code from SSC. Nancy

        Comment

        Working...
        X