Skip to content
Prev 9666 / 20628 Next

multiple nested random factors

Thank you for the response Dr. Bolker.
On 22/02/2013 9:05 AM, Ben Bolker wrote:
Yes, I have 6 detectors at each site.
I had tested for overdispersion with qcc.overdispersion.test in qcc 
package.  I had tried using an individual-level random effect to capture 
overdispersion, but was not sure how to interpret the data once that was 
included.
This paper has been very helpful and was the reason I was initially 
using glmer. Thanks! I will do some more reading.
I do have four sites, but only include three for some of my analysis. Sorry.
I applied the individual-level random effect, but how do I interpret the 
proportion of variation from each factor once it is included?

 > model <- glmer(Calls ~ f.Height + f.Site + (1|f.Site/f.Night) +
+ (1|f.Site:f.Detector), data = data, family=poisson)
 >
 > data$ID <- 1:nrow(data)
 > model1 <- glmer(Calls ~ f.Height + f.Site + (1|f.Night/f.Site) + 
(1|f.Site:f.Detector)
+ + (1|ID), data = data, family = poisson)
Number of levels of a grouping factor for the random effects
is *equal* to n, the number of observations
 >
 > anova(model, model1)
Data: data
Models:
model: Calls ~ f.Height + f.Site + (1 | f.Site/f.Night) + (1 | 
f.Site:f.Detector)
model1: Calls ~ f.Height + f.Site + (1 | f.Night/f.Site) + (1 | 
f.Site:f.Detector) +
model1:     (1 | ID)
        Df   AIC   BIC   logLik Chisq Chi Df Pr(>Chisq)
model   8 49163 49191 -24573.4
model1  9  1615  1647   -798.6 47550      1  < 2.2e-16 ***

 > model1
Generalized linear mixed model fit by the Laplace approximation
Formula: Calls ~ f.Height + f.Site + (1 | f.Night/f.Site) + 
(1|f.Site:f.Detector) + (1 | ID)
    Data: data
   AIC  BIC logLik deviance
  1615 1647 -798.6     1597
Random effects:
  Groups            Name        Variance Std.Dev.
  ID                (Intercept) 1.07827  1.03840
  f.Site:f.Night    (Intercept) 1.90958  1.38187
  f.Site:f.Detector (Intercept) 2.32948  1.52626
  f.Night           (Intercept) 0.65313  0.80817
Number of obs: 249, groups: ID, 249; f.Site:f.Night, 47; 
f.Site:f.Detector, 24; f.Night, 12

Fixed effects:
             Estimate Std. Error z value Pr(>|z|)
(Intercept)  2.59535    0.86051   3.016 0.002561 **
f.Height2   -0.05362    0.64015  -0.084 0.933245
f.Site2      1.01975    1.07455   0.949 0.342619
f.Site3      0.73546    1.08115   0.680 0.496343
f.Site4      4.15381    1.07196   3.875 0.000107 ***

Does this mean: Site has a significant effect on bat activity and
44% of the variation in bat activity levels can be explained by detector 
placement within sites
36% by an interaction between Site and Night
12% by temporal effects (night)
20% by individual variation
Does the individual variation essentially mean the variation from not 
explained by temporal and spatial effects?