1

I'm doing Zero-Inflated Model to my data. I'm using RStudio and pscl package. My models:

z_deniz <- zeroinfl(YANs ~ deniz, dist = "poisson", link = "logit", data=zipveri3)
zn3_nufus05 <- zeroinfl(YANs ~ nufus05, dist = "negbin", link = "logit", data=zipveri3)

I don't have problems with my other models but I get this error with these two models:

Error in solve.default(as.matrix(fit$hessian)) : system is computationally singular: reciprocal condition number = 9.93413e-121

Dependent variable is fire counts and independent variables are distance to coastline and population. I tried to log transform my dependent variable but it didn't work.

summary(regveri3$deniz)
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
     4.24  18010.00  48070.00  65760.00  97340.00 269200.00 

Any help is appreciated!

lmo
  • 37,904
  • 9
  • 56
  • 69
fire_ecologist
  • 253
  • 3
  • 9
  • 2
    Please add some data to make this a MWE. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/28481250?s=3|0.0000#28481250 – dww Apr 30 '16 at 11:11
  • 2
    I think this is more of a *math* question than a *programming* question: see http://stats.stackexchange.com/questions/76488/error-system-is-computationally-singular-when-running-a-glm and http://stats.stackexchange.com/questions/71438/computationally-singular-error-using-mirt-package (and more at [CrossValidated](http://stats.stackexchange.com/search?q=computationally+singular+[r])). – r2evans May 01 '16 at 05:28

1 Answers1

1

Try specifying the regressors for the zero component. If you want to use none, then add "1"; otherwise replace "1" with the variables you want to use:

z_deniz <- zeroinfl(YANs ~ deniz | 1, dist = "poisson", link = "logit", data=zipveri3)

Source can be found here .

Chait
  • 1,052
  • 2
  • 18
  • 30
rebecca592
  • 11
  • 1