[ADMB Users] Correct model for counting data

Mollie Brooks mbrooks at ufl.edu
Wed Oct 12 13:00:25 PDT 2011


Hi Marcelo,
I'm guessing your Germ is Binomial with N=20, a fixed effect of Time (possibly interacting with species), fixed effect of species, fixed effect of plant, and a random intercept for each replicate (if you have more than 5 replicates).

I'm not sure why you need zero inflation. If you don't then lmer in package lme4 would work.

gm1 <- glmer(cbind(Germ, 20 - Germ) ~ Time + Esp + Mat + (1 | Rep),
              family = binomial, data = ka.dat))
Do you think that the different replicates have different overall probabilities of germinating or, do they have different overall probabilities AND those probabilities change differently through time? In this case your random effect would look like this (Time|Rep)

If you do need zero inflation...
Check to see if your version of glmmADMB does binomial data (not negative binomial). The page here http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html for the old version says only Poisson, negative binomial and Bernoulli. You may want to get the newer version so that you can do Binomial without separating the seeds out into Bernoulli data. http://glmmadmb.r-forge.r-project.org/

You say 
> My N decrease over the time if germinated and/or infected seeds increase.

Do you remove germinated  or infected seeds? Are they not counted in later observations?

Mollie
 
Mollie Brooks
Ph.D. Candidate
NSF IGERT Fellow
Biology Department
University of Florida
mbrooks at ufl.edu
http://people.biology.ufl.edu/mbrooks




On 12 Oct 2011, at 3:17 PM, Marcelo Luiz de Laia wrote:

> I'm trying to analyze a data set from counting. By google, I found
> glmmADMB package.
> 
> However, I found little information that could help me on R
> environment.
> 
> My dataset are as follows:
> 
> Esp       Mat    Time  Rep  Germ  Inf
> Sucupira  M02     1    1    0     0
> Sucupira  M02     2    1    1     0
> Sucupira  M02     3    1    1     8
> Sucupira  M02     4    1    1     8
> Sucupira  M02     5    1    1     9
> Sucupira  M02     6    1    1     10
> Sucupira  M02     7    1    1     15
> Sucupira  M02     1    2    0     0
> (...)
> Sucupira  M02     7    3    1     10
> Sucupira  M04     1    1    0     0
> Sucupira  M04     2    1    0     1
> (...)
> Vinhatico M15CV15 7    3    5     8
> 
> Esp = Species
> Mat = Stock plant (Stock plant from three different locations)
> Time = Days that were analyzed
> Rep = Replicate (germination boxes with 20 seeds each)
> Germ = germinated seeds in each germination box (from 20)
> Inf = Number of seeds with microorganisms in each germination box
> (from 20)
> 
> These are a repeated measures over time, ie: on day 1 was counted how
> many seeds had germinated and how many had micro-organisms. On day 2
> was counted how many seeds had germinated and how many had
> micro-organisms. So until the 7th.
> 
> I tried the following code:
> 
> fit = glmm.admb(Germ~Esp*Mat+Rep,random=~Rep,group="Time",
>        zeroInflation=TRUE,data=ka.dat,family="poisson")
> 
> But, beyond the error:
> 
> Maximum number of iterations exceeded in dvector eigen(_CONST dmatrix&
> m)
> Error in glmm.admb(Germinacao ~ Especie * Matriz + Repeticao, random =
> ~Repeticao,  : 
>  The function maximizer failed
> In addition: Warning message:
> running command './nbmm -maxfn 500 ' had status 1 
> 
> I'm not sure if the model proposed by me is correct. For example, the
> 'group' should be the Time? And the random effect would be the
> Repetition (Rep)? And the family? This is a Binomial or Poison? My N
> decrease over the time if germinated and/or infected seeds increase.
> 
> I also would like to see if there is any relationship between
> germination and infestation for both species and for stock plants
> (different places - regions).
> 
> If you have experience with this package could give some tips?
> 
> Thanks
> 
> -- 
>  O___   - Marcelo
> c/  /'_ - 
> (*)  \(*)- 
> ~~~~~~~~~- Brazil
> ^^^^^^^^^- Linux user number 487797
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20111012/7ae6db60/attachment.html>


More information about the Users mailing list