Skip to content

R: mixed zero-inflated poisson regression

1 message · Highland Statistics Ltd

#
------------------------------

Message: 3
Date: Mon, 14 Nov 2011 17:17:47 +0100
From: Ivar Herfindal<ivar.herfindal at bio.ntnu.no>
To: "ONKELINX, Thierry"<Thierry.ONKELINX at inbo.be>
Cc: "r-sig-mixed-models at r-project.org"
	<r-sig-mixed-models at r-project.org>
Subject: Re: [R-sig-ME] mixed zero-inflated poisson regression
Message-ID:<4EC13F2B.5040307 at bio.ntnu.no>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dear Thierry

Thank you for your quick response. I have previously tried to follow the
CourseNote you suggested without success. I gave it another try today,
and it seems I have manged to generate such a zero-inflated model as I
want during the day. The syntax looks something like this:

mcmodm1<- MCMCglmm(Y ~ trait -1 + at.level(trait, 1:2):A, data=dataa,
      family="zipoisson", rcov=~idh(trait):units, nitt=30000, random=~gr)

However, the main challenge is that the model seems quite unstable
withmy "real" data. Even with 100000 iterations, two identical specified
models gives quite different output, and plotting the mcmodm1$Sol
suggest not very stable estimates. This occurs also on my simulated data.

Do anyone have any suggestion on how to make the model more stable (e.g.
by the rcov or random arguments)? Or do I just have to run it as long as
it takes to get "fairly precise" estimates?







Ivan

First of all I don't think that 100,000 iterations are enough for a ZIP GLMM. Also...you need to ask yourself whether you really want
to use covariates and random effects in the binary part. I assume that is what your MCMCglmm code is doing (??)..I haven't used MCMCglmm.
It does increase the complexity of the model.

Also...before applying ZIP GLMMs you need to ask yourself, and investigate, where all these zeros are coming from. It may well be that the
binary part of the model tries to model the zeros, whereas the random effect terms may also try to capture the zeros. This may happen
if most of your zeros are clustered in your groups (or levels) for the random effect. As a result the chains coming out of MCMC for the different parameters
are highly correlated. Check mixing of the chains....and plot chains of different parameters to see whether they are correlated...I guess they are. And that is
most likely because different components in the model are fighting for the zeros.

The above problem is perhaps easier to understand for a time series. Suppose you have a long time series of counts...but most counts are 0. So..is this zero inflation or
temporal auto-correlation? Fit a ZIP GLM with temporal correlation and you will get the same problems as you described above (poor mixing).


Zero inflation doesn't always mean you have to apply zero inflated models. Perhaps an ordinary GLMM can model the zeros? My gutfeeling is that
your model is to complicated (ie. random effects vs the zero inflation part of the model). Solution...simplify the model.
See:

Zero Inflated Models and Generalized Linear Mixed Models with WinBUGS and R (2012). Zuur et al.

for the same problems (and solutions).


Alain













Ivar
On 14.11.2011 10:40, ONKELINX, Thierry wrote: