Skip to content
Prev 8549 / 20628 Next

A zero inflated Poisson model in MCMCglmm

Hi,

I agree with David that an ordinal model may behave better for this  
type of data (or even a 0/1 response with deformed or not) but in case  
you want to pursue a ZIP model...

The model you have specified is probably not what you had in mind. You  
should think of the ZIP response as being two responses (traits): the  
Poisson counts (trait 1) and the probability that a zero comes from  
the zero-inflation process (trait 2). At the moment you have a common  
intercept for both and therefore assume that the probability that a  
zero is from the zero-inflation process (on the logit scale) is equal  
to the mean Poisson count (on the log scale). There is probably little  
justification for this (but see ZAP models). Moreover, you have a  
single animal term, and therefore assume that both processes have the  
same genetic variance and that the genetic correlation between them is  
1. You also assume that the residual variance for each process is  
equal (but the residual correlation is 0), although this is not  
actually that bigger deal because residual variation in the  
zero-inflation process (and residual corrletaion) is not identifiable  
from the data and so the value it could take is essentially arbitrary.  
However, I like to recognise this non-identifiability by fixing the  
variance at 1 and the covariance at zero (but see ZAP models where  
your specification is useful).

So, a more appropriate model would be:

model1.1<-MCMCglmm(Toes~trait,random=~us(trait):animal,family="zipoisson",rcov=~idh(trait):units,pedigree=ped,data=data,prior=prior1.1,nitt=500000,thin=500,burnin=200000,verbose=FALSE)

or perhaps

model1.2<-MCMCglmm(Toes~trait,random=~idh(trait):animal,family="zipoisson",rcov=~idh(trait):units,pedigree=ped,data=data,prior=prior1.1,nitt=500000,thin=500,burnin=200000,verbose=FALSE)

The difference between these two is that the genetic correlation  
between the zero-inflation and the Poisson processes is estimated, and  
in the latter it is set to 0.

I'm not sure about how much data you have, but I would think that if  
the incidence of deformed toes is very low, you probably have little  
information for some of the parameters. In this case you have to be  
VERY careful with priors. The prior recommendations in the MCMCglmm  
tutorial in Wilson et al. 2011 will generally be quite informative for  
small or even moderate sized datasets (the authors have kindly  
published an erratum as many people seem to be using their  
recommendation without realising its implications).

The prior could look like:

prior=list(R=list(V=diag(2), nu=0, fix=2), G=list(G1=G1))

which fixes the residual variance in the zero-inflation process to 1  
with a flat improper prior on the Poisson over-dispersion. For the  
prior on the genetic (co)variances (G1) I generally use parameter  
expanded priors of the form:

G1=list(V=diag(2), nu=2, alpha.mu=c(0,0), alpha.V=diag(2)*1000)

or

G1=list(V=diag(2), nu=1, alpha.mu=c(0,0), alpha.V=diag(2)*1000)

for model.2.

  These generally give posterior modes for the variance components  
that are close to (RE)ML estimates, although it is unclear to me how  
they behave for the covariances and functions of variances (e.g.  
heritability). At least for binary traits (e.g. the zero-inflation  
bit) I have seen a chi-square prior recommended because of its  prior  
properties on the heritability (de Villemereuil in MEE). This type of  
prior can also be obtained using parameter expansion:

(V=1, nu=1000, alpha.mu=0, alpha.V=1)

and I would guess that the multivariate analogue would be (V=diag(2),  
nu=1001, alpha.mu=c(0,0), alpha.V=diag(2)). However, a chi-square  
prior probably has poor properties for the Poisson variance and in  
MCMCglmm you could only mix these different priors for model.2 using a  
different syntax:

model1.2<-MCMCglmm(Toes~trait,random=~idh(at(trait,1)):animal+idh(at(trait,2)):animal,family="zipoisson",rcov=~idh(trait):units,pedigree=ped,data=data,prior=prior1.1,nitt=500000,thin=500,burnin=200000,verbose=FALSE)

G=list(
     G1=list(V=1, nu=1, alpha.mu=0, alpha.V=1000),
     G2=list(V=1, nu=1000, alpha.mu=0, alpha.V=1)
   )


Cheers,

Jarrod




Quoting Helen Ward <h.l.ward at qmul.ac.uk> on Wed, 04 Jul 2012 16:24:36 +0100: