[R-sig-ME] zero-inflated poisson in MCMCglmm: error in if (any(rterms == "animal"))

Adrian Jaeggi ajaeggi at anth.ucsb.edu
Wed Mar 9 18:18:11 CET 2011

Dear all,

I'm having some troubles running zero-inflated poisson models in  
MCMCglmm and after reading the MCMCglmm Course Notes and the Hadfield  
2010 J Stat Software paper and discussing with colleagues I still  
couldn't figure out the problem so any help here would be greatly  

I am analyzing data from an indigenous population in Bolivia, and in  
this example I'm testing the influence of a person's highest school  
grade on their annual monetary income. Because access to wage labor is  
very limited and recent in this remote population, most people score 0  
on income which is why I want to use zero-inflated poisson. I also  
want to include sampling location (community and region) as random  

Following a previous thread on this list  
I used the following code:

   priors <- list(R=list(V=diag(2),n=2, fix=2),  
G=list(G1=list(V=diag(2), n=2), G2=list(V=diag(2), n=2)))

   model<- MCMCglmm(AnnualIncome~trait+trait:grade-1,
   rcov~idh(trait):units, prior=priors, pl=TRUE, family="zipoisson",

Running this code returns the following error message (roughly  
translated from German):
   error in if (any(rterms == "animal")) { :
    missing value where TRUE/FALSE is necessary

I have no idea what this error message refers to. I understand the  
"animal" comes from the blue tits example in the package but I don't  
see what it refers to here and why this evaluation fails to return  

Thanks so much for any help with this!
Best regards,

Adrian Jaeggi, PhD
Postdoctoral Researcher
Human Behavioral Ecology Lab
Department of Anthropology
University of California Santa Barbara
Santa Barbara, CA 93106-3210
Phone: 805-455-8587

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