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

Ben Bolker bbolker at gmail.com
Wed May 14 22:13:19 CEST 2014

On 14-05-14 08:56 AM, Carlos Barboza wrote:
> Dear Dr. Bolker,

  (note this is sent to the mixed models list, not just to me ...)

> I'm working with spatial factors: sectors are spaced by kilometers, sites
> (randomly sampled within sectors) are spaced by hundred of meters, and
> points (randomly sampled within sites) are spaced by dozen of meters. I
> have, 3 sectors, 3 sites within each sector and 3 points within each site,
> replicated 5 times (n=135). Sectors specify a pollution gradient. So I want
> to investigate the sector's effect (fixed) and the spatial variability
> within each sector by two spatial scales, sites and points. Labels were
> coded like your example in http://glmm.wikidot.com/faq:  (e.g. A1, A2, …,
> B1, B2, …), the only difference is to include points (A11,A12,A13.....A33).
> So this was my doubt:
>> model.1<- glmmadmb(total ~ sector + (1 | sector/site/point),...
> or
>> model.2<-glmmadmb(total ~ sector + (1 | site/point),...
> when I want to include all spatial variability????

  Given what you have said, the second specification is correct.  The
first includes sector, redundantly, both as a fixed effect and as a
grouping variable for variation in intercepts.

> # since I want to test if a model including only sector or sector and
> within spatial variability of each sectors, are better then a null model, I
> specified this null model with the intercept only:
>> null.model<-glmmadmb(total ~ 1 ,..

  Sounds reasonable, although keep in mind the issues with using
likelihood ratio tests to test null hypotheses of zero variance ...

  Ben Bolker

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