Good afternoon;

I've previously had success using SAS to create generalized linear mixed models for data with a negative binomial distribution (count data of aquatic invertebrates). However, I've also recently confirmed that this data set is zero-inflated. To deal with the zero-inflation in the negative binomial distribution and maintain nested random effects (both basin and year, nested within site), I have tried to switch my models to R and use the glmmADMB package for a revised set of analyses.. 

I seem to be having some problems with random effects parts of my models and am hoping that someone on this list may have been through a similar experience and be able to help.

First I imported the data and ran a simplified version of the model with only fixed effects:

amphs_zinb_simple<-glmmadmb(VCAmphCountI~Zone+BPeriod, data=Amphs, zeroInflation=TRUE, family="nbinom")

This model ran with no apparent errors and results seemed feasible. Feeling confident that I knew what was going on, I then added one simple random effect to the model;

amphs_zinb_bionull<-glmmadmb(VCAmphCountI~Zone + BPeriod +1|Site, data=Amphs, zeroInflation=TRUE, family="nbinom")

Hmmm. This did not seem to go so well (see error & warning messages below). I have been through the raw data and can not find the NAs that are referred to, nor can I figure out why I get the warning message about the random factor (Site). Any insights or suggestions would be appreciated.  I don't want to try and incorporate further random effects until I know what I am doing wrong...

Error: dims [product 1979] do not match the length of object [0]
In addition: Warning messages:
1: In Ops.factor(1 + 1, Site) : | not meaningful for factors
2: In glmmadmb(VCAmphCountI ~ 1 + 1 | Site, data = Amphs, zeroInflation = TRUE,  :
  NAs removed in constructing fixed-effect model frame: you should probably remove them manually, e.g. with na.omit()
3: In cbind(0, II[, -ncol(II)]) :
  number of rows of result is not a multiple of vector length (arg 1)

Thanks in advance,
kbg

-~-~-~-
Kirsty E. B. Gurney, Ph.D.
Alaska Cooperative Fish and Wildlife Research Unit
Institute of Arctic Biology
209 Irving 1 Building
University of Alaska Fairbanks
Fairbanks, AK 99775
T: (907) 474 - 7738
-~-~-~-


	[[alternative HTML version deleted]]

