[R-sig-eco] Error in solve.default(as.matrix(fit$hessian))
Alvinda Nisma Yusniar
@|v|nd@n|@m@y @end|ng |rom gm@||@com
Tue Dec 10 02:16:19 CET 2019
*Dear list,*
*I'm trying to construct a zero-inflated poisson model but I get greeted
by an error. I haven't had the chance to try my dataset on different OSs or
different R version, but I did mange to try that for the "cod parasite"
data from Zuur et al book (Mixed effect models...) and I get a similar
error (models with different formulas may or may not go through, depending
on R version and the system). This is the error I get for the cod data.*
M3 <- zeroinfl(Y ~ X1+X2+X3+X4+X5+X6+X7 | ## Predictor for the Poisson process
+ X1+X2+X3+X4+X5+X6+X7, ## Predictor for the Bernoulli process;
+ dist = 'poisson',
+ data = DB)
Error in solve.default(as.matrix(fit$hessian)) :
system is computationally singular: reciprocal condition number = 1.12074e-52
In addition: Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
*I get the same error on my data:*
frm <- formula(Y ~ X1+X2+X3+X4+X5+X6+X7| X1+X2+X3+X4+X5+X6+X7)
nb <- zeroinfl(frm, dist="negbin", link="logit", data=DB)
Error in solve.default(as.matrix(fit$hessian)) :
system is computationally singular: reciprocal condition number = 2.80889e-26
In addition: Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
I would suggest to simplify your model (dropping covariates). I guess
the code has difficulties estimating standard errors, or it may be in a
local optimum. Or contact the owner of the package.
If some of your covariates are factors with many levels, then this may
also cause numerical instabilities. Perhaps you can simplify the binary
part of the model?
* Has anyone any idea how to solve this? It has been suggested that it's
something in my data, but I don't know what to think if the cod parasite
data shows different success/failures on different versions for the same
model.*
*Cheers,*
Alvinda
[[alternative HTML version deleted]]
More information about the R-sig-ecology
mailing list