Zero inflated distribution

Hi, i create a zero inflated poisson(zip) but get a warnning.
All variables is integer.
summary(model <- zeroinfl(need ~ emg + back | exist, data = dataset))

warnning algorithm did not converge. fitted probabilities numerically 0 or 1 occure occurred.

1 Like

I have never done zero inflated Poisson regression but I have seen this in logistic regression when there is a perfect boundary between the two outcomes. Below I show a toy example that produces the error. I also plotted the data to show the boundary. Since you are fitting to two variables, you may be able to plot the data in a similar way and look for a boundary. Since you are fitting a Possion, I assume you have at least a few levels of counts, so a plot may be less useful.

#> Warning: package 'ggplot2' was built under R version 3.5.3
DF <- expand.grid(1:10, 1:10)
DF$Y <- ifelse(DF$Var1 <=  DF$Var2, 1, 0)
model <- glm(Y ~ Var1 + Var2, family=binomial(link='logit'),data=DF)
#> Warning: algorithm did not converge
#> Warning: fitted probabilities numerically 0 or 1 occurred

ggplot(DF, aes(x = Var1, y = Var2, color = factor(Y))) + geom_point()

Created on 2019-10-27 by the reprex package (v0.3.0.9000)

How can write exit model for interpret?

Sorry, I do not understand what you mean by "exit model". Also it is very difficult to give specific advice without knowing anything about your data or what you are trying to model. If you can prepare a Reproducible Example that demonstrates what you are trying to do and results in the error, someone may be able to help.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.