[R-sig-ME] modelling zero inflated count data with glmm

David Atkins datkins at u.washington.edu
Mon Apr 20 22:02:53 CEST 2009


I am fairly certain that you can not fit a zero-inflated model using 
glmer() (and I am not familiar with the fmr function).

As for whether you *need* a zero-inflated or negative binomial, there is 
evidence for over-dispersion (assuming we can trust the sigma reported 
in the quasipoisson, which I believe Doug Bates said might be suspect...).

One option could be to use the MCMCglmm package.  It fits a broad class 
of generalized linear mixed models from a Bayesian perspective using 
Markov Chain Monte Carlo (MCMC) methods.

If you look at its family argument, you will see that it can fit a 
zero-inflated Poisson.

I have just started using it myself and have found it very intuitive. 
Of course, it would help tremendously to have some familiarity with 
Bayesian statistics and the basics of MCMC fitting methods.

Jarrod Hadfield (the package author) may be able to provide more direct 
comments on what the call to MCMCglmm might look like for a 
zero-inflated Poisson (and perhaps a quasi-Poisson? ideally, it would be 
nice to test a succession of models re. over-dispersion).

See the tutorial vignette in the MCMCglmm package for an introduction.

Hope that helps.

cheers, Dave

Dave Atkins, PhD
Research Associate Professor
Center for the Study of Health and Risk Behaviors
Department of  Psychiatry and Behavioral Science
University of Washington
1100 NE 45th Street, Suite 300
Seattle, WA  98105
datkins at u.washington.edu

Hello R users,

During My PhD I collected count data which I and seems as zero inflated.
I have run a statistical model with lmer with family=quasipoisson and
got summary(model)@sigma~10 so I believe there is overdispertion but it
does not high enough to use negative binomial or zero inflated models.
Am I right?

I thought maybe using the fmr function in the 'gnlm' library but it
seems it cannot handle random effects:

I have these variables in the model:
   count: the number of logs in a foraging tray (this is the response
   ta: the ambient temperature at the foraging tray.
   habitat: the habitat type of the foraging tray.
   season: the season in which the experiment session took place (summer
or winter).
   moon: the moon phase (new or full).
   position: a random factor (I had 4 foraging stations)
   individual_id: a random factor indicating the individual foraged in
the tray.

This is the lmer parameters I have used:
model<-lmer(count~ta*habitat*season*moon + (1|individual_id) +
(1|position), data=countdata, family=poisson)

Is it possible to run the same model with fmr?

I would really appreciate the help. I love working with R and it really
changed the way I work with my data.
Thanks again,

	[[alternative HTML version deleted]]

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