2
$\begingroup$

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?

$\endgroup$

2 Answers 2

1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.