Zookie
Zookie

Reputation: 1

How to run zero inflated poisson in R if zeroinfl function cannot be found?

I am using R version 3.6.0 and I am following this guide in order to run a zero-inflated poisson regression on cholera data: https://stats.idre.ucla.edu/r/dae/zip/

I have installed the pscl package as instructed, but when I run my code, an error message shows.

cholera2 <- within(cholera, {wateraccess <- factor(wateraccess, order=TRUE, levels=c(1,2,3,4))})

summary(cholera2)
summary(m1 <- zeroinfl(cases ~ wateraccess + atpc, data = cholera2))

I tried using a different version of R and it has the same issue.

Error message: Error in zeroinfl(cases ~ wateraccess + atpc, data = cholera2) : could not find function "zeroinfl"

Upvotes: 0

Views: 1542

Answers (0)

Related Questions