[R-sig-ME] zero-inflated-count-data?

C. AMAL D. GLELE altessedac2 at gmail.com
Mon Feb 26 14:57:00 CET 2018


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) ?
   Thierry,
can you, please, provide me details (some ways to do it) and/or lead about
simulating data from a fitted model?

In advance, thanks for your answers.
Best,

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

> The pscl package offers the (somewhat controversial) Vuong test for this
> purpose and is a good ZI/hurdle resource in general.
>
> Jonathan
>
> > On Feb 25, 2018, at 3:45 PM, C. AMAL D. GLELE <altessedac2 at gmail.com>
> wrote:
> >
> > Hi, Ben
> > Many thanks to you for your very helpful reply.
> > Best and regards,
> >
> > 2018-02-25 19:05 GMT+01:00 Ben Bolker <bbolker at gmail.com>:
> >
> >> There is no set proportion.  (For example, a Poisson distribution with
> >> a mean of 0.01 is expected to be about 99% zeros, even without
> >> zero-inflation.) There's a little bit of (bare-bones) discussion of
> >> how to test for zero-inflation here:
> >> https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#zero-inflation
> >>
> >> On Sun, Feb 25, 2018 at 7:08 AM, C. AMAL D. GLELE <
> altessedac2 at gmail.com>
> >> wrote:
> >>> Hi, dear all.
> >>> From which proportion of zero a count should be considered as
> >> zero-inflated
> >>> (in order to use a zero-inflated model for it's modelling)?
> >>> In advance, thanks for your replies.
> >>> Best,
> >>>
> >>> <https://www.avast.com/sig-email?utm_medium=email&utm_
> >> source=link&utm_campaign=sig-email&utm_content=webmail>
> >>> Garanti
> >>> sans virus. www.avast.com
> >>> <https://www.avast.com/sig-email?utm_medium=email&utm_
> >> source=link&utm_campaign=sig-email&utm_content=webmail>
> >>> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >>>
> >>>        [[alternative HTML version deleted]]
> >>>
> >>> _______________________________________________
> >>> R-sig-mixed-models at r-project.org mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
> >    [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list