---------------------------------------------------------------------- Message: 1 Date: Mon, 22 Feb 2010 08:06:00 +0100 From: Roman Lu?trik<roman.lustrik at gmail.com> To: r-sig-ecology at r-project.org Subject: [R-sig-eco] Error in solve.default(as.matrix(fit$hessian)) Message-ID: <63a206011002212306k4c18aa20r173804aa7e9f0ab4 at mail.gmail.com> Content-Type: text/plain Dear list, I'm trying to construct a zero-inflated negative binomial 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. 1> nb1a<- zeroinfl(Intensity ~ Area*Year | Area*Year + Length, dist="negbin", link="logit", data=ParasiteCod2) Error in solve.default(as.matrix(fit$hessian)) : system is computationally singular: reciprocal condition number = 1.5208e-17 I get the same error on my data: frm<- formula(st_zir ~ obs_b+sonce+mraz+nmv | obs_b+sonce+mraz+nmv) nb<- zeroinfl(frm, dist="negbin", link="logit", data=zir2) Error in solve.default(as.matrix(fit$hessian)) : system is computationally singular: reciprocal condition number = 3.87086e-25
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? Alain
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, Roman
Dr. Alain F. Zuur First author of: 1. Analysing Ecological Data (2007). Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p. URL: www.springer.com/0-387-45967-7 2. Mixed effects models and extensions in ecology with R. (2009). Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer. http://www.springer.com/life+sci/ecology/book/978-0-387-87457-9 3. A Beginner's Guide to R (2009). Zuur, AF, Ieno, EN, Meesters, EHWG. Springer http://www.springer.com/statistics/computational/book/978-0-387-93836-3 Other books: http://www.highstat.com/books.htm Statistical consultancy, courses, data analysis and software Highland Statistics Ltd. 6 Laverock road UK - AB41 6FN Newburgh Tel: 0044 1358 788177 Email: highstat at highstat.com URL: www.highstat.com URL: www.brodgar.com