0

I've been working out some vglm() model in R. When I do this:

 fit <- vglm(label~.-index, family=multinomial, data=train)

I get an error as below.

Error in if (min(ans) == 0 || max(ans) == 1) warning("fitted probabilities numerically 0 or 1 occurred") : missing value where TRUE/FALSE needed

I have absolutely no idea what the matter is and how to fix it.

And I've tried this as well

fit <- glm(label~.-index, family=multinomial, data=train)

And I get another error which I can't figure out either. Thanks.

Error: $ operator not defined for this S4 class

user9191983
  • 505
  • 1
  • 4
  • 20
  • Look up complete or quasi-complete separation in logistic regression. That should explain what the problem is (quick version: if a combination of predictors will result in perfect predictions then your probabilities should be either zero or one which corresponds to no variation. Multiple/logistic regression requires that probabilities are strictly between zero and one). You may need fewer predictors / more data – ekstroem Feb 06 '19 at 10:56
  • Also, check out the answer to this [question out](https://stackoverflow.com/questions/8596160/why-am-i-getting-algorithm-did-not-converge-and-fitted-prob-numerically-0-or?rq=1) – ekstroem Feb 06 '19 at 11:03

0 Answers0