0

I know this isn't directly related to statistics but I didn't know where else I should post this so please let me know and I will remove the question if this is the wrong forum.

My question is very simple. I have a logistic regression model that is predicting whether or not a patient has a certain type of disease. And I'm getting the warning "fitted probabilities numerically 0 or 1 occurred". Should I be worried or super happy about it?

Model plot

John Cataldo
  • 165
  • 5
  • Couple of questions: When it predicts 1 or 0 is always right? How are you using this model? (eg Are you looking for risk factors or as some sort of detector?) Are you using any variables that might be future facing? (eg results from a "Has this disease" test) Has the model been tested/validated on external data? if so hasn't it performed well on that? – Kitter Catter May 16 '19 at 22:07
  • 2
    Likely duplicate: https://stats.stackexchange.com/questions/11109/how-to-deal-with-perfect-separation-in-logistic-regression Most often this error occurs when you have *complete separation* meaning that you have a predictor that, in your sample, completely separates the outcome into 0 or 1. Sometimes this is because a predictor is very very good (female sex is probably a really good predictor of not having prostate cancer, for example). Sometimes it is because of small sample size. You should be worried but not panic. – Bryan Krause May 16 '19 at 22:07
  • @KitterCatter its always right when the probability is 0 or 1 and I’m using it as a detector. I don’t think there are future facing variables (not sure I understand the meaning), they are all covariates of the type age, sex, concentration of something in the blood... and I haven’t tested the model on any external data. – John Cataldo May 17 '19 at 06:03

0 Answers0