Skip to content

0-inflated GLMM in R

3 messages · Katarzyna Kulma, David Atkins, Ben Bolker

#
Hello ADMB-users!

I'm new to glmmADMB and I just can't get it going. I'm trying to run the model

m1<-glmmadmb(rec~INFECTION*bin.age*ld+(1|RINGNO)+(1|year),zeroInflation=TRUE,family="poisson")

where rec is a number of chicks recruited to the population a year
after they fledged (heavily 0-inflated); INFECTION = a malaria
infection status, 1=infected, 0=uninfected; bin.age=binomial age of
parents (yearling, or older); ld-lay date, a covariate. The ring
number and the year are random effects. Yet, when I run this model on  
Mac OX 10.5.8 (R version 2.15) I receive a following message:

Error in parse(text = lab) : object 'lab' not found

In addition: Warning messages:
1: In is.na(rows) : is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(rows) : is.na() applied to non-(list or vector) of type 'NULL'

When I run it on Windows XP (R version 2.15), then I get this:

Error in II[, ii] = II[, ii] + REmat$codes[[i]] :
   number of items to replace is not a multiple of replacement length
In addition: Warning messages:
1: In glmmadmb(rec ~ INFECTION * bin.age * ld + (1 | RINGNO) + (1 |  :
   NAs removed in constructing fixed-effect model frame: you should  
probably remove them manually, e.g. with na.omit()
2: In II[, ii] + REmat$codes[[i]] :
   longer object length is not a multiple of shorter object length


I receive these messages when I run the model in both, the most recent
version of glmmADMB or the older one (0.7). Does anyone have any
idea what is going on here? When I posted this question on ADMB-Users  
mailing list, Dave Fourier suggested that it is probably an R issue  
and encouraged me to post this message here. If there's no way I can  
run ADMB, is there any other way I can run 0-inflated mixed models in  
R? I'll appreciate any piece of advice

best wishes,
Kasia
#
Kasia--

Not sure about the glmmADMB issues (though suspect Ben Bolker may be 
able to help).  It is possible to fit zero-inflated (and related) models 
via MCMCglmm package.  We wrote a tutorial article on mixed models for 
count regression that includes R code (including MCMCglmm for 
zero-inflated models), which you can find:

http://depts.washington.edu/cshrb/newweb/statstutorials.html

[Second to last ms]

Hope that helps.

cheers, Dave
#
Katarzyna Kulma <katarzyna.kulma at ...> writes:
I think the problem may be that you are not passing your data
to glmmADMB as a data frame.  This format is not supposed to
be required, but I haven't tested the alternative case (where
the variables are simply located in the global workspace) very
carefully, so there may be problems.

  Also note the error message on Windows, which tells you that
you should probably remove NA values from your data set before
proceeding.

  Can you give the results of sessionInfo() ?  Are you using version
0.7.2.12 from r-forge?