0

I am using R to calculate odds ratios for several univariate models with a binomial outcome.

The problem is, for some of my variables, I am getting the following error glm.fit: fitted probabilities numerically 0 or 1 occurred. I have found that these variables commonly have at least 1 zero count cell.

It seems that the Haldane correction (0.5 is added to all cells of the contingency table) is commonly used when there is a zero count cell for a 2x2 contingency table. However, some of my variables have more than 2 levels.

Can I apply the Haldane correction for my variables with >2 categorical levels? Or, is there an alternate recommendation to fix this problem?

Jenny
  • 59
  • 4
  • 1
    This is more of a stats question than a programming question, so I have voted to migrate it to CrossValidated, our sister Stack Exchange site dedicated to statistics questions. You are more likely to get a good answer over there. – Allan Cameron Sep 17 '20 at 07:29
  • @AllanCameron Thanks for the recommendation, I will bring this over to Cross Validated. – Jenny Sep 17 '20 at 07:48

0 Answers0