Economic Investment by Ant Colonies in Searches for Better Homes

advertisement
Economic Investment by Ant Colonies in Searches for Better Homes.
Authors
Carolina Doran1, 2, Tom Pearce1, Aaron Connor1, Thomas Schlegel1, Elizabeth Franklin1, Ana B.
Sendova-Franks3 and Nigel R. Franks1.
1 – School of Biological Sciences, University of Bristol, Woodland Road, Bristol BS81UG, UK
2 – Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown, Av. Brasília,
Lisbon 1400-038, Portugal
3 - Department of Engineering Design and Mathematics, UWE Bristol, Coldharbour Lane, Bristol
BS161QY, UK
SUPPLEMENTARY MATERIAL
1
All graphical and statistical analyses were carried out in the statistical software package R (version
2.15.2)[1].
Figure S1A: The number of scouts, as a percentage of the total number of workers, counted every 10
min over 5 hours for 15 colonies each housed in each of five nests of different quality; a loess curve
has been fitted to the data for each colony for each nest quality to facilitate comparisons.
2
Figure S1B: The same relationship as in figure S1A but with the data points removed, leaving only
the fitted loess curves for clarity.
3
Model Selection
Random effects
Df
AIC
BIC
logLik
1
(1|colony)
11
7844
7907
-3911
2
(nest|colony)
25
3500
3643
-1725
4373
14
<0.0001
3
(1|colony) + (-1+nest|colony)
26
3502
3651
-1725
0.00
1
1.0000
4
(time|colony)
na
na
na
na
na
na
na
5
(1|colony) + (-1+time|colony)
na
na
na
na
na
na
na
26
3359
3508
-1654
143
0
<0.0001
27
3361
3516
-1654
0.00
1
0.9998
41
2917
3153
-1417
472
14
<0.0001
42
2919
3160
-1417
0.00
1
0.9999
6
7
(nest|colony) +
(-1+time|colony)
(1|colony) + (-1+nest|colony)
+ (-1+time|colony)
Chisq
Chi
Model
Df
Pr(>Chisq)
(nest|colony) +
8
(-1+time|colony) +
(-1+nest:time|colony)
(1|colony) + (-1+nest|colony)
9
+ (-1+time|colony) +
(-1+nest:time|colony)
Table S1: The nine models that were compared differ only in their random effects component. The
response variable in each model is the log ratio between the number of workers scouting and the
number of workers not scouting. The fixed component consists of the effect of nest quality, time and
the interaction between nest quality and time. All nine models were fitted with the glmer() function
in the R package ‘lme4’ [2] and compared with the anova() function, which uses a Likelihood Ratio
Test (LRT) to compare models fitted with glmer(). A significant Chi-sq test statistic from the LRT
indicates that the extra term in a subsequent model contributes significantly. A smaller value for AIC
or BIC indicates a better fit of the model to the data. Model 1 is the null model, with the random
factor ‘colony’ allowed to vary around the overall intercept (average value). Model 8 is the chosen,
best, model. The ΔAIC between model 8 and 9 is 2 and hence there is nothing to distinguish between
these two models either in terms of goodness-of-fit or in terms of parameter estimates. Values for
models 4 and 5 are not included because in either case the algorithm for parameter estimation gave
false convergence (warning message 8) at the second iteration. All other models reached
convergence before the default 300 iterations.
4
Figure S2: A ‘caterpillar’ plot for the effect of the random factor ‘colony’ in the null model, 1 (Table
S1). The 95% prediction intervals (PIs) for two of the colonies touch 0 but the PIs for none of the 15
colonies straddle 0. This means that colonies deviate significantly from the overall intercept and
hence the inclusion of the random factor ‘colony’ in the model is necessary. Therefore, applying a
Generalized Linear Mixed Model rather than a Generalized Linear Model is justified.
5
Goodness-of-fit for the chosen model
Figure S3: The overall residuals for the chosen model 8 (Table S1) are approximately normal with
just a little deviation from normality in the tails (as evident from the Q-Q plot on the right). A
statistical test shows a significant deviation from normality (Shapiro-Wilk normality test: W = 0.9957,
p-value = 2.96e-06) but this is to be expected to some extent for a sample size of 2325 (15 colonies x
5 nest qualities x 31 time points) and the model is robust to some deviation from normality.
Figure S4: A Q-Q plot for the residuals per nest quality (1 to 5 represent increasing nest quality)
reveals that most of the deviations from normality are in the extreme tails particularly for the
highest nest qualities, 4 (Good) and 5 (Excellent).
6
Figure S5: An examination of residuals-versus-fitted-values plots per nest quality reveals that the
residuals are approximately homogeneous (1 to 5 represent increasing nest quality).
7
overdisp_fun <- function(model) {
## number of variance parameters in
## an n-by-n variance-covariance matrix
vpars <- function(m) {nrow(m)*(nrow(m)+1)/2}
model.df <- sum(sapply(VarCorr(model),vpars))+length(fixef(model))
(rdf <- nrow(model@frame)-model.df)
rp <- residuals(model)
Pearson.chisq <- sum(rp^2)
prat <- Pearson.chisq/rdf
pval <- pchisq(Pearson.chisq, df=rdf, lower.tail=FALSE)
c(chisq=Pearson.chisq,ratio=prat,rdf=rdf,p=pval)}
>overdisp_fun(mmod8.sum)
chisq
ratio
rdf
2083.8025402
0.9123479 2284.0000000
p
0.9988304
Table S2: We used Ben Bolker’s overdisp.fun() function to test for overdispersion in the chosen
model 8, with sum contrasts (Table S1). Binomial (and Poisson) error terms assume that the variance
and mean of the dependant variable are equal. Specifically, if the residual deviance (i.e. the residual
sum of squares) is greater than the residual degrees of freedom (i.e. the variance is greater than
expected for a standardised Binomial (Poisson) distribution), then some variance remains
unexplained. This is called overdispersion ([3], pp. 59-61). Therefore, ideally, the ratio above
(between the residual deviance and the residual degrees of freedom) should be 1. For model 8, the
ratio is approximately 0.912, which suggests a slight underdispersion, but it is not statistically
significant because the p-value is greater than 0.05.
Parameter estimation
Nest quality
Lower limit for 95% CI Estimated probability
Upper limit for 95%CI
Excellent
0.02019156
0.02940141
0.04262932
Good
0.05350015
0.07757514
0.11121093
Medium
0.05088081
0.07240533
0.10205643
Satisfactory
0.08290268
0.11499615
0.15738163
Poor
0.10023777
0.13370814
0.17616642
Table S3: Estimated probability with 95% CIs for an ant scouting for the five different levels of nest
quality. These are the values used in Fig. 2a in the paper. These values were calculated from the base
level intercepts and their standard errors in the models in Tables S7 – S11 below using the z value of
1.96. Probability was estimated with plogis(base_intercept), the lower limit for the 95% CI with
plogis(base_intercept+qnorm(0.025)*standard_error) and the upper limit for the 95% CI with
plogis(base_intercept+qnorm(0.975)*standard_error).
Nest quality
Lower limit for 95% CI
Estimated odds ratio
Upper limit for 95%CI
Excellent
0.9974921
0.9991742
1.0008591
Good
0.9958724
0.9976319
0.9993945
Medium
0.9978243
0.9987898
0.9997562
Satisfactory
0.9979308
0.9985611
0.9994206
Poor
0.9986172
0.9992823
0.9999479
Table S4: Estimated odds ratio with 95% CIs for an ant scouting in successive 10 min for the five
different levels of nest quality. These are the values used in Fig. 2b in the paper. These values were
calculated from the base level coefficients for time and their standard errors in the models in Tables
S7 – S11 below using the z value of 1.96. The odds ratio was estimated with exp(base_coefficient),
the lower limit for the 95% CI with exp(base_coefficient+qnorm(0.025)*standard_error) and the
upper limit for the 95% CI with exp(base_coefficient+qnorm(0.975)*standard_error).
8
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(scouts$NoScouts, scouts$TotalAnts - scouts$NoScouts)
scouts$Nest * scouts$Time + (scouts$Nest | scouts$Colony) +
scouts$Time | scouts$Colony) + (-1 + scouts$Nest:scouts$Time |
scouts$Colony)
AIC BIC logLik deviance
2917 3153 -1417
2835
Random effects:
Groups
Name
Variance
Std.Dev. Corr
scouts$Colony (Intercept)
1.9887e-01 0.4459495
scouts$Nest1
1.9964e-01 0.4468132 0.019
scouts$Nest2
1.7128e-01 0.4138631 0.360
scouts$Nest3
2.6454e-01 0.5143363 0.157
scouts$Nest4
3.0814e-01 0.5551047 0.187
scouts$Colony scouts$Time
4.9952e-08 0.0002235
scouts$Colony scouts$Nest1:scouts$Time 1.3763e-06 0.0011731
scouts$Nest2:scouts$Time 2.4504e-06 0.0015654 0.297
scouts$Nest3:scouts$Time 3.0467e-06 0.0017455 0.311
scouts$Nest4:scouts$Time 1.1420e-05 0.0033793 0.062
scouts$Nest5:scouts$Time 9.7144e-06 0.0031168 0.278
~
(-1 +
-0.286
-0.005
0.054
-0.408
-0.502
0.274
-0.406
0.098 -0.152
0.374
-0.367 0.069
Number of obs: 2325, groups: scouts$Colony, 15
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)
-2.4864269 0.1161956 -21.399 < 2e-16
scouts$Nest1
0.6178854 0.1179306
5.239 1.61e-07
scouts$Nest2
0.4457499 0.1100154
4.052 5.08e-05
scouts$Nest3
-0.0638854 0.1360621 -0.470
0.6387
scouts$Nest4
0.0106903 0.1464892
0.073
0.9418
scouts$Time
-0.0013132 0.0003032 -4.332 1.48e-05
scouts$Nest1:scouts$Time 0.0005953 0.0003003
1.982
0.0474
scouts$Nest2:scouts$Time -0.0001267 0.0005025 -0.252
0.8009
scouts$Nest3:scouts$Time 0.0001023 0.0004896
0.209
0.8345
scouts$Nest4:scouts$Time -0.0010578 0.0007477 -1.415
0.1571
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) sct$N1 sct$N2 sct$N3 sct$N4
scouts$Nst1 0.009
scouts$Nst2 0.339 -0.273
scouts$Nst3 0.150 -0.010 -0.393
scouts$Nst4 0.180 0.045 0.085 -0.155
scouts$Time -0.034 0.017 0.014 0.004 0.001
scts$Ns1:$T 0.017 -0.083 0.003 0.010 0.013
scts$Ns2:$T 0.008 0.002 -0.061 0.009 0.010
scts$Ns3:$T 0.003 0.007 0.011 -0.065 0.014
scts$Ns4:$T 0.000 0.007 0.009 0.010 -0.043
***
***
***
***
*
scts$T s$N1:$ s$N2:$ s$N3:$
-0.366
-0.498 0.379
-0.297 0.215 -0.175
0.353 -0.529 -0.719
0.061
> plogis(-2.4864269)
[1] 0.0768152 # Average probability of an ant scouting over all 5 nest qualities.
> exp(-0.0013132)
[1] 0.9986877 # Average odds ratio for an ant scouting per 10 min increase in time.
9
Table S5: The chosen model 8 run with sum contrasts. In this case the estimate for the highlighted
intercept is the log odds for an ant scouting over all 5 nest qualities. Since it is also the base level, the
odds ratio is equal to 1. Therefore, instead of converting the intercept into an odds ratio of
probability of an ant scouting for a particular category versus the probability of an ant scouting for
the base category, we convert directly into probability. The probability is 1/(1+exp(-intercept)),
which is the same as the probability estimated with the probability function for the logistic
distribution, plogis(). The highlighted coefficient against time is the log odds for an ant scouting with
each successive 10 min. The odds ratio is exp(coefficient against time).
10
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(scouts$NoScouts, scouts$TotalAnts - scouts$NoScouts) ~
scouts$Nest * scouts$Time + (scouts$Nest | scouts$Colony) +
(-1 +
scouts$Time | scouts$Colony) + (-1 + scouts$Nest:scouts$Time |
scouts$Colony)
AIC BIC logLik deviance
2917 3153 -1417
2835
Random effects:
Groups
Name
Variance
Std.Dev.
Corr
scouts$Colony (Intercept)
1.9887e-01 0.44594563
scouts$Nest.L
3.8462e-01 0.62018082 -0.380
scouts$Nest.Q
4.1698e-01 0.64574351 -0.447 0.500
scouts$Nest.C
4.1512e-01 0.64429638 -0.128 0.600
scouts$Nest^4
3.7455e-01 0.61200231 -0.168 0.136
scouts$Colony scouts$Time
1.6168e-08 0.00012715
scouts$Colony scouts$Nest1:scouts$Time 1.4101e-06 0.00118746
scouts$Nest2:scouts$Time 2.4843e-06 0.00157616 0.309
scouts$Nest3:scouts$Time 3.0804e-06 0.00175509 0.322 -0.390
scouts$Nest4:scouts$Time 1.1454e-05 0.00338433 0.070 -0.492
scouts$Nest5:scouts$Time 9.7481e-06 0.00312220 0.283 0.278
0.537
0.156
0.178
0.377
-0.358 0.072
Number of obs: 2325, groups: scouts$Colony, 15
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)
-2.4864324 0.1161954 -21.399 < 2e-16
scouts$Nest.L
-1.1674045 0.1645446 -7.095 1.30e-12
scouts$Nest.Q
-0.2976697 0.1706469 -1.744
0.0811
scouts$Nest.C
-0.2397613 0.1695068 -1.414
0.1572
scouts$Nest^4
-0.3109517 0.1611995 -1.929
0.0537
scouts$Time
-0.0013132 0.0003032 -4.332 1.48e-05
scouts$Nest.L:scouts$Time -0.0003630 0.0006417 -0.566
0.5716
scouts$Nest.Q:scouts$Time 0.0008404 0.0006429
1.307
0.1912
scouts$Nest.C:scouts$Time 0.0005546 0.0007873
0.704
0.4812
scouts$Nest^4:scouts$Time 0.0007687 0.0004441
1.731
0.0835
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) sc$N.L sc$N.Q
scots$Nst.L -0.353
scots$Nst.Q -0.427 0.497
scots$Nst.C -0.120 0.582 0.528
scots$Nst^4 -0.161 0.133 0.150
scouts$Time -0.034 -0.026 -0.011
scts$N.L:$T -0.018 -0.067 -0.027
scts$N.Q:$T -0.008 -0.028 -0.059
scts$N.C:$T -0.003 -0.009 -0.015
scts$N^4:$T -0.004 -0.005 -0.002
***
***
.
.
***
.
sc$N.C sc$N^4 scts$T s$N.L: s$N.Q: s$N.C:
0.178
-0.006
-0.010
-0.018
-0.040
-0.013
-0.004
-0.003 0.600
-0.002 0.224 0.378
-0.008 -0.272 -0.242 0.647
-0.071 -0.214 -0.365 -0.092
0.177
Table S6: The chosen model 8 run with polynomial contrasts. As the highlighted values show, most
of the variation in nest quality is explained by the linear contrasts. The contribution of quadratic,
cubic or quartic contrasts is not statistically significant.
11
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(scouts$NoScouts, scouts$TotalAnts - scouts$NoScouts) ~
scouts$Nest * scouts$Time + (scouts$Nest | scouts$Colony) +
(-1 +
scouts$Time | scouts$Colony) + (-1 + scouts$Nest:scouts$Time |
scouts$Colony)
AIC BIC logLik deviance
2917 3153 -1417
2835
Random effects:
Groups
Name
Variance
Std.Dev.
Corr
scouts$Colony (Intercept)
5.4163e-01 0.73595626
scouts$Nest1
1.1652e+00 1.07943417 -0.819
scouts$Nest2
9.2814e-01 0.96339897 -0.682 0.777
scouts$Nest3
1.1792e+00 1.08591204 -0.742 0.801
scouts$Nest4
1.5571e+00 1.24785692 -0.816 0.832
scouts$Colony scouts$Time
1.0902e-07 0.00033019
scouts$Colony scouts$Nest1:scouts$Time 1.3172e-06 0.00114769
scouts$Nest2:scouts$Time 2.3914e-06 0.00154643 0.274
scouts$Nest3:scouts$Time 2.9876e-06 0.00172847 0.291 -0.439
scouts$Nest4:scouts$Time 1.1361e-05 0.00337056 0.049 -0.521
scouts$Nest5:scouts$Time 9.6555e-06 0.00310732 0.268 0.266
0.716
0.853
0.766
0.368
-0.383 0.064
Number of obs: 2325, groups: scouts$Colony, 15
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)
-3.4968703 0.1965454 -17.792 < 2e-16
scouts$Nest1
1.6282976 0.2842497
5.728 1.01e-08
scouts$Nest2
1.4561908 0.2551945
5.706 1.16e-08
scouts$Nest3
0.9465389 0.2866935
3.302 0.000961
scouts$Nest4
1.0211240 0.3277976
3.115 0.001839
scouts$Time
-0.0008262 0.0008597 -0.961 0.336520
scouts$Nest1:scouts$Time 0.0001083 0.0008436
0.128 0.897855
scouts$Nest2:scouts$Time -0.0006137 0.0008641 -0.710 0.477539
scouts$Nest3:scouts$Time -0.0003848 0.0011145 -0.345 0.729914
scouts$Nest4:scouts$Time -0.0015448 0.0012022 -1.285 0.198788
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) sct$N1 sct$N2
scouts$Nst1 -0.821
scouts$Nst2 -0.693 0.778
scouts$Nst3 -0.746 0.799 0.717
scouts$Nst4 -0.815 0.829 0.847
scouts$Time -0.073 0.050 0.056
scts$Ns1:$T 0.074 -0.063 -0.057
scts$Ns2:$T 0.072 -0.050 -0.072
scts$Ns3:$T 0.056 -0.039 -0.043
scts$Ns4:$T 0.052 -0.036 -0.040
***
***
***
***
**
sct$N3 sct$N4 scts$T s$N1:$ s$N2:$ s$N3:$
0.764
0.050
-0.051
-0.049
-0.055
-0.036
0.044
-0.044
-0.043
-0.034
-0.046
-0.921
-0.870
-0.907
-0.664
0.844
0.897
0.626
0.732
0.404
0.722
Table S7: The chosen model 8 run with treatment contrasts using nest quality 5 (Excellent) as the
base. The highlighted values were used to calculate the probabilities and odds ratios in row 1 of
Tables S3 and S4 above. All other coefficients represent distances from the base. We used the zvalues against these non-base level coefficients to test for significant differences from the base level.
To correct for the four comparisons per coefficient, we used α’ = 0.05/4 = 0.0125.
12
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(scouts$NoScouts, scouts$TotalAnts - scouts$NoScouts) ~
scouts$Nest * scouts$Time + (scouts$Nest | scouts$Colony) +
(-1 +
scouts$Time | scouts$Colony) + (-1 + scouts$Nest:scouts$Time |
scouts$Colony)
AIC BIC logLik deviance
2917 3153 -1417
2835
Random effects:
Groups
Name
Variance
Std.Dev.
Corr
scouts$Colony (Intercept)
5.9963e-01 7.7436e-01
scouts$Nest1
4.8113e-01 6.9364e-01 -0.628
scouts$Nest2
4.3430e-01 6.5902e-01 -0.520 0.480
scouts$Nest3
6.5945e-01 8.1206e-01 -0.575 0.598
scouts$Nest5
1.5571e+00 1.2478e+00 -0.836 0.504
scouts$Colony scouts$Time
1.7013e-11 4.1247e-06
scouts$Colony scouts$Nest1:scouts$Time 1.4262e-06 1.1942e-03
scouts$Nest2:scouts$Time 2.5005e-06 1.5813e-03 0.315
scouts$Nest3:scouts$Time 3.0965e-06 1.7597e-03 0.327 -0.382
scouts$Nest4:scouts$Time 1.1470e-05 3.3867e-03 0.074 -0.487
scouts$Nest5:scouts$Time 9.7640e-06 3.1247e-03 0.286 0.280
0.453
0.646
0.512
0.378
-0.354 0.074
Number of obs: 2325, groups: scouts$Colony, 15
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)
-2.4757588 0.2027219 -12.213 < 2e-16
scouts$Nest1
0.6071938 0.1838439
3.303 0.000957
scouts$Nest2
0.4350706 0.1755494
2.478 0.013200
scouts$Nest3
-0.0745592 0.2148013 -0.347 0.728510
scouts$Nest5
-1.0210912 0.3277979 -3.115 0.001839
scouts$Time
-0.0023709 0.0009007 -2.632 0.008477
scouts$Nest1:scouts$Time 0.0016531 0.0009417
1.755 0.079191
scouts$Nest2:scouts$Time 0.0009311 0.0011626
0.801 0.423238
scouts$Nest3:scouts$Time 0.0011600 0.0008682
1.336 0.181526
scouts$Nest5:scouts$Time 0.0015440 0.0012022
1.284 0.199020
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) sct$N1 sct$N2
scouts$Nst1 -0.634
scouts$Nst2 -0.529 0.488
scouts$Nst3 -0.580 0.597 0.458
scouts$Nst5 -0.827 0.502 0.636
scouts$Time -0.032 0.035 0.037
scts$Ns1:$T 0.031 -0.051 -0.036
scts$Ns2:$T 0.025 -0.028 -0.047
scts$Ns3:$T 0.033 -0.037 -0.038
scts$Ns5:$T 0.024 -0.027 -0.028
***
***
*
**
**
.
sct$N3 sct$N5 scts$T s$N1:$ s$N2:$ s$N3:$
0.507
0.030
-0.029
-0.023
-0.059
-0.023
0.020
-0.019
-0.015
-0.020
-0.046
-0.933
-0.941
-0.845
-0.701
0.918
0.840
0.716
0.756
0.733
0.458
Table S8: The chosen model 8 run with treatment contrasts using nest quality 4 (Good) as the base.
The highlighted values were used to calculate the probabilities and odds ratios in row 2 of Tables S3
and S4 above. We used the z-values against the non-base level coefficients to test for significant
differences from the base level.
13
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(scouts$NoScouts, scouts$TotalAnts - scouts$NoScouts) ~
scouts$Nest * scouts$Time + (scouts$Nest | scouts$Colony) +
(-1 +
scouts$Time | scouts$Colony) + (-1 + scouts$Nest:scouts$Time |
scouts$Colony)
AIC BIC logLik deviance
2917 3153 -1417
2835
Random effects:
Groups
Name
Variance
Std.Dev.
Corr
scouts$Colony (Intercept)
5.3536e-01 7.3168e-01
scouts$Nest1
4.6664e-01 6.8311e-01 -0.596
scouts$Nest2
6.0869e-01 7.8019e-01 -0.561 0.562
scouts$Nest4
6.5945e-01 8.1206e-01 -0.501 0.581
scouts$Nest5
1.1792e+00 1.0859e+00 -0.738 0.324
scouts$Colony scouts$Time
4.5593e-12 2.1353e-06
scouts$Colony scouts$Nest1:scouts$Time 1.4262e-06 1.1942e-03
scouts$Nest2:scouts$Time 2.5004e-06 1.5813e-03 0.315
scouts$Nest3:scouts$Time 3.0966e-06 1.7597e-03 0.327 -0.382
scouts$Nest4:scouts$Time 1.1470e-05 3.3867e-03 0.074 -0.487
scouts$Nest5:scouts$Time 9.7643e-06 3.1248e-03 0.286 0.280
0.658
0.507
0.160
0.378
-0.354 0.074
Number of obs: 2325, groups: scouts$Colony, 15
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)
-2.5503150 0.1917044 -13.303 < 2e-16
scouts$Nest1
0.6817523 0.1809842
3.767 0.000165
scouts$Nest2
0.5096210 0.2058805
2.475 0.013312
scouts$Nest4
0.0745651 0.2148016
0.347 0.728490
scouts$Nest5
-0.9465439 0.2866954 -3.302 0.000961
scouts$Time
-0.0012109 0.0004934 -2.454 0.014121
scouts$Nest1:scouts$Time 0.0004931 0.0005163
0.955 0.339586
scouts$Nest2:scouts$Time -0.0002290 0.0007605 -0.301 0.763343
scouts$Nest4:scouts$Time -0.0011601 0.0008682 -1.336 0.181497
scouts$Nest5:scouts$Time 0.0003840 0.0011146
0.345 0.730432
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) sct$N1 sct$N2
scouts$Nst1 -0.603
scouts$Nst2 -0.568 0.564
scouts$Nst4 -0.507 0.580 0.652
scouts$Nst5 -0.731 0.329 0.504
scouts$Time -0.055 0.058 0.052
scts$Ns1:$T 0.052 -0.087 -0.049
scts$Ns2:$T 0.036 -0.038 -0.057
scts$Ns4:$T 0.031 -0.033 -0.029
scts$Ns5:$T 0.025 -0.026 -0.023
***
***
*
***
*
sct$N4 sct$N5 scts$T s$N1:$ s$N2:$ s$N4:$
0.170
0.049
-0.047
-0.032
-0.059
-0.022
0.037
-0.035
-0.024
-0.021
-0.055
-0.774
-0.838
-0.217
-0.679
0.785
0.149 -0.015
0.693 0.634
0.285
Table S9: The chosen model 8 run with treatment contrasts using nest quality 3 (Medium) as the
base. The highlighted values were used to calculate the probabilities and odds ratios in row 3 of
Tables S3 and S4 above. We used the z-values against the non-base level coefficients to test for
significant differences from the base level.
14
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(scouts$NoScouts, scouts$TotalAnts - scouts$NoScouts) ~
scouts$Nest * scouts$Time + (scouts$Nest | scouts$Colony) +
(-1 +
scouts$Time | scouts$Colony) + (-1 + scouts$Nest:scouts$Time |
scouts$Colony)
AIC BIC logLik deviance
2917 3153 -1417
2835
Random effects:
Groups
Name
Variance
Std.Dev.
Corr
scouts$Colony (Intercept)
5.0302e-01 0.70923641
scouts$Nest1
4.7654e-01 0.69031619 -0.586
scouts$Nest3
6.0869e-01 0.78018877 -0.521 0.574
scouts$Nest4
4.3431e-01 0.65902083 -0.361 0.472
scouts$Nest5
9.2812e-01 0.96338894 -0.651 0.180
scouts$Colony scouts$Time
1.4725e-07 0.00038373
scouts$Colony scouts$Nest1:scouts$Time 1.2789e-06 0.00113089
scouts$Nest2:scouts$Time 2.3531e-06 0.00153398 0.258
scouts$Nest3:scouts$Time 2.9492e-06 0.00171733 0.278 -0.460
scouts$Nest4:scouts$Time 1.1322e-05 0.00336489 0.039 -0.533
scouts$Nest5:scouts$Time 9.6170e-06 0.00310113 0.262 0.260
0.373
0.238 -0.153
0.365
-0.393 0.061
Number of obs: 2325, groups: scouts$Colony, 15
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)
-2.0406933 0.1851324 -11.023 < 2e-16
scouts$Nest1
0.1721221 0.1819353
0.946 0.34412
scouts$Nest3
-0.5096293 0.2058843 -2.475 0.01331
scouts$Nest4
-0.4350686 0.1755518 -2.478 0.01320
scouts$Nest5
-1.4561602 0.2551917 -5.706 1.16e-08
scouts$Time
-0.0014400 0.0004390 -3.280 0.00104
scouts$Nest1:scouts$Time 0.0007220 0.0004777
1.512 0.13066
scouts$Nest3:scouts$Time 0.0002291 0.0007605
0.301 0.76327
scouts$Nest4:scouts$Time -0.0009309 0.0011626 -0.801 0.42329
scouts$Nest5:scouts$Time 0.0006136 0.0008641
0.710 0.47759
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) sct$N1 sct$N3
scouts$Nst1 -0.589
scouts$Nst3 -0.524 0.570
scouts$Nst4 -0.369 0.472 0.374
scouts$Nst5 -0.643 0.188 0.241
scouts$Time -0.045 0.045 0.041
scts$Ns1:$T 0.041 -0.075 -0.038
scts$Ns3:$T 0.026 -0.027 -0.057
scts$Ns4:$T 0.017 -0.017 -0.016
scts$Ns5:$T 0.023 -0.023 -0.020
***
*
*
***
**
sct$N4 sct$N5 scts$T s$N1:$ s$N3:$ s$N4:$
-0.128
0.048
-0.043
-0.028
-0.047
-0.024
0.032
-0.030
-0.019
-0.012
-0.072
-0.728
-0.790
-0.718
-0.264
0.743
0.624
0.319
0.665
0.063
0.325
Table S10: The chosen model 8 run with treatment contrasts using nest quality 2 (Satisfactory) as the
base. The highlighted values were used to calculate the probabilities and odds ratios in row 4 of
Tables S3 and S4 above. We used the z-values against the non-base level coefficients to test for
significant differences from the base level.
15
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(scouts$NoScouts, scouts$TotalAnts - scouts$NoScouts) ~
scouts$Nest * scouts$Time + (scouts$Nest | scouts$Colony) +
(-1 +
scouts$Time | scouts$Colony) + (-1 + scouts$Nest:scouts$Time |
scouts$Colony)
AIC BIC logLik deviance
2917 3153 -1417
2835
Random effects:
Groups
Name
Variance
Std.Dev.
Corr
scouts$Colony (Intercept)
4.0598e-01 0.63716213
scouts$Nest2
4.7654e-01 0.69032186 -0.431
scouts$Nest3
4.6662e-01 0.68309794 -0.387 0.355
scouts$Nest4
4.8113e-01 0.69363471 -0.325 0.547
scouts$Nest5
1.1652e+00 1.07942865 -0.748 0.479
scouts$Colony scouts$Time
9.3280e-08 0.00030542
scouts$Colony scouts$Nest1:scouts$Time 1.3329e-06 0.00115450
scouts$Nest2:scouts$Time 2.4072e-06 0.00155151 0.280
scouts$Nest3:scouts$Time 3.0033e-06 0.00173300 0.297 -0.430
scouts$Nest4:scouts$Time 1.1377e-05 0.00337291 0.052 -0.516
scouts$Nest5:scouts$Time 9.6710e-06 0.00310982 0.271 0.268
0.304
0.307
0.060
0.370
-0.378 0.065
Number of obs: 2325, groups: scouts$Colony, 15
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)
-1.8685625 0.1663413 -11.233 < 2e-16
scouts$Nest2
-0.1721292 0.1819347 -0.946 0.344095
scouts$Nest3
-0.6817563 0.1809810 -3.767 0.000165
scouts$Nest4
-0.6071866 0.1838430 -3.303 0.000957
scouts$Nest5
-1.6282975 0.2842470 -5.728 1.01e-08
scouts$Time
-0.0007179 0.0003397 -2.113 0.034584
scouts$Nest2:scouts$Time -0.0007220 0.0004777 -1.511 0.130668
scouts$Nest3:scouts$Time -0.0004931 0.0005163 -0.955 0.339574
scouts$Nest4:scouts$Time -0.0016530 0.0009417 -1.755 0.079197
scouts$Nest5:scouts$Time -0.0001091 0.0008436 -0.129 0.897071
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) sct$N2 sct$N3
scouts$Nst2 -0.438
scouts$Nst3 -0.393 0.356
scouts$Nst4 -0.333 0.539 0.307
scouts$Nst5 -0.739 0.472 0.305
scouts$Time -0.052 0.047 0.047
scts$Ns2:$T 0.037 -0.075 -0.033
scts$Ns3:$T 0.034 -0.030 -0.087
scts$Ns4:$T 0.019 -0.017 -0.017
scts$Ns5:$T 0.021 -0.019 -0.019
***
***
***
***
*
.
sct$N4 sct$N5 scts$T s$N2:$ s$N3:$ s$N4:$
0.068
0.047
-0.033
-0.031
-0.051
-0.019
0.030
-0.021
-0.019
-0.011
-0.063
-0.465
-0.395 -0.169
-0.299 -0.263 0.411
-0.154 0.240 -0.303
0.096
Table S11: The chosen model 8 run with treatment contrasts using nest quality 1 (Poor) as the base.
The highlighted values were used to calculate the probabilities and odds ratios in row 5 of Tables S3
and S4 above. We used the z-values against the non-base level coefficients to test for significant
differences from the base level.
16
Model selection, goodness-of-fit tests for the chosen model and the interpretation of the model
parameters were carried out according to [3–5]. For the tests of significance of the effects, we used
the z-values and the associated p-values in the output from glmer(). Each such z-value is an
approximation of the chi-squared value from the likelihood ratio test comparing the two models
with the tested parameter present or missing, such that the square of z is approximately equal to
the chi-squared value for 1 d.f.
References:
1. Bates, D., Maechler, M. & Bolker, B. 2012 lme4: Linear mixed-effects models using S4 classes. R
package version 0.999999-0. http://CRAN.R-project.org/package=lme4.
2. Faraway, J. J. 2005 Extending the Linear Model with R: Generalized Linear, Mixed Effects and
Nonparametric Regression Models. CRC Press.
3. Maindonald, J. & Braun, W. J. 2010 Data Analysis and Graphics Using R: An Example-Based
Approach (Cambridge Series in Statistical and Probabilistic Mathematics). Cambridge University
Press.
4. R Core Team 2012 R: A Language and Environment for Statistical Computing. R Foundation for
Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org/.
5. Thomas, R., Vaughan, I. & Lello, J. 2011 Data Analysis with R Statistical Software. Cardiff: EcoExplore.
17
Download