[R] glmmADMB

rbuxton moyble at hotmail.com
Tue May 8 08:34:05 CEST 2012


Hi there,

I am new to the package glmmadmb, but need it to perform a zero-inflated
gzlmm with a binomial error structure.  I can't seem to get it to work
without getting some strange error messages.

I am trying to find out what is affecting the number of seabird calls on an
array of recorders placed at 4 sites on 6 islands.  I have nightly variables
(weather and moonlight), site variables (proximity to a source population of
seabirds and proximity to a refugia from predators). and island variables
(island size and number of years since predator eradication).  

Here's a sample of my data:

Date	ISLAND	SITE	Calls	Years Erad	Island size	Refugia	Dist Source	Moon	Wind
Speed
5/28/2009	Amatignak 	East	9	19	3543	3	58.6	0.2	2.54
5/29/2009	Amatignak 	East	120	19	3543	3	58.6	0.3	4.63
5/30/2009	Amatignak 	East	18	19	3543	3	58.6	0.4	13.09
6/4/2009	Amatignak 	North	23	19	3543	2	54.2	0.9	4.14
6/5/2009	Amatignak 	North	69	19	3543	2	54.2	1	2.06
6/6/2009	Amatignak 	North	62	19	3543	2	54.2	1	3.94
6/7/2009	Buldir	N Bight	357	100	2000	4	0	1	7.49
6/8/2009	Buldir	N Bight	567	100	2000	4	0	1	4.17
6/9/2009	Buldir	N Bight	150	100	2000	4	0	1	4.13

My model is as follows:

number of seabird calls ~ weather+moonlight+distance to source
population+island size+years since predator eradication+nearby refugia from
predators+ (1|Site/Island)

first I removed na's from my data

callsna <- na.omit(calls)

Then I started simple, with only "moonlight" and "weather" included in a
model (just as a test):

mod <- glmmadmb(Calls~ Moon+Wind.Speed+(1|SITE/ISLAND), data=callsna,
zeroInflation=TRUE, family="nbinom")

I get the following error message:
Error in II[, ii] = II[, ii] + REmat$codes[[i]] : 
  replacement has length zero
In addition: Warning message:
In matrix(rep(q, m), nrow = n, ncol = sum(m), byrow = TRUE) :
  data length exceeds size of matrix

I get the same error message when I try with the full model or a null model!

I don't understand what this means.  The model works ok in lmer4 with a
poisson distribution (althought it's very overdispersed), so it's not as
though it wont work at all.

Any help with this would be greatly appreciated

cheers
Rachel


--
View this message in context: http://r.789695.n4.nabble.com/glmmADMB-tp4616701.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list