[R-sig-ME] Doubts about models in glmmADMB

Ben Bolker bbolker at gmail.com
Wed May 14 03:32:31 CEST 2014


On 14-05-13 02:11 PM, Carlos Barboza wrote:
>> I'm a phd student from The Federal University of Rio de Janeiro
>> Brazil in Marine Biology. First it's a pleasure to to send you a message.
> The reason
>> for it is that I'm using glmmADMB package for run my analyses and I
>> have some doubts. In a simple way I have the following model:
>> sectors a fixed factor; sites (nested in sectors, random), points
>> (nested in sites, random). So:
>>
>> teste1<- glmmadmb(total ~ sector + (1 | sector/site/point),...

This doesn't make sense to me.  In general, categorical predictors
should appear in fixed effects or as grouping variables, but not both ...

>>
>> # why  did the result gave me the effect of the factor sector alone,
>> also in the random effects...? since the random effect included
>> only the nested factors and must include only the effects of
>> sector/site and sector/site/point
>>
>> # but if I try:
>>
>> teste1<- glmmadmb(total ~ set + (1 | site/point),...
>>
>> # I get that result, but I think that with this path, site/point
>> were not nested within sector

  It depends whether site is implicitly or explicitly nested; if sites
have unique labels (implicit nesting), then this should be fine (see
http://glmm.wikidot.com/faq for more discussion).  I have done this on
occasion when the top level of the hierarchy has insufficient
replication to treat as a random effect (see e.g. the 'herbivory'
example at http://glmm.wikidot.com/examples).

>>
>> # in another ocasion it is correct to code only random effects like:
>> model<- glmmadmb(log(total+1) ~ 1, random= ~ 1 | set/loc/pon,
> family=......

  This would be OK

  I'm not entirely sure what your specific question is, though ...

>



More information about the R-sig-mixed-models mailing list