Announcement

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

  • Logistic Regression with 0 Events in One Group

    Hi All,

    Just a simple question about a logistic regression model when one of the binary exposure groups has zero events/outcomes. Is there anyway to generate a hazard ratio for the exposure variable in this situation or is the idea of a hazard ratio nonsensical in this case because of the perfect prediction of events.

    I seem to remember at some point being taught that you can alter the numbers by adding 0.5 to generate hazard ratios. However, this may have been for chi-square tests with a 0 value in a cell rather than logistic regression.

    Thanks for your help.

  • #2
    Rahul: I think your initial intuition is correct: nonsensical due to perfect prediction. The effect may exist in the population, but your data are not powerful enough to identify it empirically.

    Comment


    • #3
      Great, thanks very much John. Interestingly, we have similar last names!

      Comment


      • #4
        From somebody with a rather different last name, this problem arises because logistic regression relies on maximum likelihood estimation, and under the circumstances described, the maximum likelihood estimate of the coefficient is (positive or negative) infinity. There are however other approaches to this problem that do not use maximum likelihood estimation. The official Stata command -exlogistic- can handle this. Be warned, however, that the calculations are rather analogous to the use of the Fisher exact test in a contingency table and are both computationally and memory-intensive. Really not suitable if your data set is very large or you have many variables in the model. Another approach is penalized maximum likelihood, implemented in the user-written -firthlogit.ado-, available from SSC.

        Comment


        • #5
          There is also penlogit, another user-written command that can handle separation.
          Code:
          search penlogit
          will show where it's available from. (Also, the official Stata bayesmh could be worth looking into for this kind of situation.)

          Comment

          Working...
          X