Hello,
I am new to mixed modeling and using the glmmadmb package. I am interested
in using glmmadmb to model count data with a negative binomial
distribution, using year and site sampled as my random effect variables, as
both should be allowed to vary independently. I would like to consider
random intercepts for both factors, but also random slopes for sites across
all years. I am not sure how to code this in R, and have tried several
different ways. Usually R just takes a super long time and does not seem to
complete the computation - which leads me to think my syntax is incorrect.
Any suggestions/ thoughts would be greatly appreciated! I'm using Windows 7
with RStudio v.0.98.312.

Here is what works - random intercepts model:

       mod <- glmmadmb(species~(1|year)+(1|site),data=cs,
       family="nbinom2",link="log")

Here are some iterations I have tried which did not seem to work:

      mod <- glmmadmb(species~(1+site|year)+(1|site),data=cs,...)
      mod <- glmmadmb(species~(site|year)+(1|site),data=cs,...)
      mod <- glmmadmb(species~(1|year)+(1|site)+(0|site),data=cs,...)

Thank you,
Tiffany

	[[alternative HTML version deleted]]

