2

I'm fitting a zero-inflated poisson model using the "pscl" package. The formula that I'm using is:

modelzero<-zeroinfl(formula=indice_abund~pH+condut+regime_hidr+bacia_drenag+alt+ordem+grao_med+prof+veloc_corr+galeria+ensomb+veget,data=poiss)

But then I get this message:

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

I saw in other forums that the problem may be related to my data. Is that correct?

Rui
  • 41
  • 1
  • 7

2 Answers2

1

From another post (here: Error "system is computationally singular" when running a glm), and based on the number of predictor variables you have in your model, I would suggest you look for collinear predictors in your model, or whether you are trying to fit a model with more variables than observations.

user3237820
  • 540
  • 5
  • 12
0

I'm not sure how much similarity there in the errors but I get the error below using hurdle().

Error in solve.default(as.matrix(fit_zero$hessian)) : 
  Lapack routine dgesv: system is exactly singular: U[1,1] = 0

In my case, the error happens only when I specify the weights=weight_var. Using a normalized weight (weights= weight_var/mean(weight_var)) solved my problem.