Skip to content
Prev 16253 / 20628 Next

zero-inflated-count-data?

----------------------------------------------------------------------

Message: 1
Date: Mon, 26 Feb 2018 14:57:00 +0100
From: "C. AMAL D. GLELE" <altessedac2 at gmail.com>
To: Jonathan Judge <bachlaw01 at outlook.com>
Cc: Ben Bolker <bbolker at gmail.com>,  R SIG Mixed Models
	<r-sig-mixed-models at r-project.org>
Subject: Re: [R-sig-ME] zero-inflated-count-data?
Message-ID:
	<CANrzCv0SZxAXjoftdkN7v5M4g6wrd3GM7qx23dFB=fi7JHisCg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi, dear all.
Many thanks to you all for your very helpful answers.
Jonathan,
I've started fitting a model using zeroinfl function from pscl package, but
I'm having the following

difficulty according to one of my regressors, let be H_var (categorical
with 8 levels):
as regressors, I have 7 categorical variables (with a total of 26 levels)
and two numerical

variables;
1) when I fit the model like follows,
model1<-zeroinfl(countdata~var1+H_var+var3+var4+var5+var6+var7+var8num

+var9num,dist="negbin",data=mydata)
, I receive the error message below:
"Error in solve.default(as.matrix(fit$hessian)) :
   system is computationally singular: reciprocal condition number =
7.05621e-21
In addition: Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
"
2)
but, if I remove H_var from the count component and fits model2 loke
follows,
model2<-zeroinfl(countdata~var1+var3+var4+var5+var6+var7+var8num+
var9num|H_var,dist="negbin",data=mydata)
  the model fits well and I do not receive error message anymore.
3)
If use H_var in both component of the model, like follows,
model3<-zeroinfl(countdata~var1+var3+var4+var5+var6+var7+var8num+
var9num+H_var|H_var,dist="negbin",data=mydata)
I receive the following error message:
"Error in solve.default(as.matrix(fit$hessian)) :
   system is computationally singular: reciprocal condition number =
4.2618e-20
"
Question:
  Does someone have any idea about probables causes of the problems posed
at points 1) and 3) ?






Without seeing the data......simplify your model? Collinearity? Start simple and build up the complexity of the model.
Maybe start with a Poisson GLM and figure out whether you really need a ZIP/ZINB? Why are you actually do a ZINB?






can you, please, provide me details (some ways to do it) and/or lead about
simulating data from a fitted model?





See step 10 in:

A protocol for conducting and presenting results of regression-type analyses (2016).
Zuur & Ieno.

http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12577/abstract

and see Figure 8 from that paper for an example. R code is somewhere online as well.


Alain







 ?In advance, thanks for your answers.
Best,

2018-02-25 23:55 GMT+01:00 Jonathan Judge <bachlaw01 at outlook.com>: