Electronic supplementary material Scoring system and summing

advertisement
Electronic supplementary material
Scoring system and summing algorithm for individual colony performances
The scoring system reflects measurable and controllable differences in the sorting values of
the sediment. Colonies were assigned scores for their choices based on these relative
differences and therefore the relative degree of difficulty of being able to discriminate and
choose between alternatives. In the combination of nest cavities filled with very well- and
poorly sorted sediment, where there is the greatest degree of difference, colonies therefore
received a score of +1 if they chose the very well-sorted nest or -1 if they chose the poorly
sorted nest. In the combinations of nest cavities filled with very well- and moderately sorted,
and well- and poorly sorted sediment, where there is an intermediate degree of difference, the
colonies received a score of +2 or -2 for choosing the better- or more poorly sorted nest of the
pair respectively. In the combinations of nest cavities filled with very well- and well-sorted,
well- and moderately sorted, and moderately and poorly sorted sediment, where there is the
least degree of difference, the colonies received a score of +3 or -3 for choosing the better- or
more poorly sorted nest of the pair respectively. Colonies that split or failed to emigrate
received a score of zero. The consistency and relative rates of excavation for the different
types of sediment filled cavity support this system.
The nature of the combinations of four different nest types means that there is only
one combination with the greatest degree of difference between the alternatives whilst there
are two and three combinations with the intermediate and least degree of difference
respectively. This could introduce a bias; however, the effect would be positive in that the
colonies are exposed to a greater number of combinations with the least degree of difference
between the alternatives. It is therefore less likely for a false positive result of a colony being
1
able to discriminate between alternatives with the least degree of difference to be observed.
This argument can equally be levelled at there only being one combination where there is the
greatest degree of difference between alternatives, thereby increasing the chances of a false
positive result; however, the finding of a preference across all queen-right colonies for nest
cavities filled with very well-sorted sediment over poorly sorted sediment demonstrates that
these are not false positive results.
Total scores for each colony were obtained by summing the individual scores from
each experiment in a downstream order whereby scores are only summed for the
combinations where there is a lower degree of difference between the sorting values of the
alternatives if the colony had made a clear choice in all the combinations where the
differences in the sorting values of the alternatives were greater. The summing algorithm
assumes that colonies are either consistently choosing the nest cavities filled with bettersorted or more poorly sorted sediment and was construed a posteriori following the results of
binary choice experiments, which indicate that colonies are not making choices for either the
better- or more poorly sorted nest depending on the combination.
Randomization test
The following script is for use in R (R, v. 2.15.1, 2012, The R Foundation for Statistical
Computing).
# read data table as .txt file
a <- read.table("/insert file location.txt",header=F)
# create a second copy of the data matrix
2
b <- read.table("/insert file location.txt",header=F)
# initialise three of the variables
prerandscore <- 0
randscore <- 0
score5ormore <- 0
# randomisation loop (edit '10000' for more/less randomisations)
for (i in 1:10000)
{
# create 6 different random permutations and randomly permutate each of the 6 score
columns
ord2 <- order(runif(12,0,1))
b[,2] <- a[,2][ord2]
ord3 <- order(runif(12,0,1))
b[,3] <- a[,3][ord3]
ord4 <- order(runif(12,0,1))
b[,4] <- a[,4][ord4]
ord5 <- order(runif(12,0,1))
3
b[,5] <- a[,5][ord5]
ord6 <- order(runif(12,0,1))
b[,6] <- a[,6][ord6]
ord7 <- order(runif(12,0,1))
b[,7] <- a[,7][ord7]
# sum the randomised score for each ant going through the rows
for (j in 1:12)
{
prerandscore <- 0
if (b[j,2] != 0)
{
prerandscore <- prerandscore+b[j,2]
}
else
{
prerandscore <- 0
randscore[j] <- prerandscore
next
4
}
if (b[j,3] != 0 && b[j,4] != 0)
{
prerandscore <- prerandscore+b[j,3]+b[j,4]
}
else
{
prerandscore <- prerandscore
randscore[j] <- prerandscore
next
}
if (b[j,5] != 0 && b[j,6] != 0 && b[j,7] != 0)
{
prerandscore <- prerandscore+b[j,5]+b[j,6]+b[j,7]
}
else
{
prerandscore <- prerandscore
randscore[j] <- prerandscore
next
}
randscore[j] <- prerandscore
}
5
# count the number of randomised scores that are equal to 5 or more
score5ormore[i] <- length(randscore[randscore>=5])
}
# p-value of the test
print((length(score5ormore[score5ormore>=3])+1)/1001)
# graph of the test as pdf
pdf(file="randfig.pdf")
par(pty="s")
hist(score5ormore,xlim=c(0,5), main = "", xlab="Number of colonies in a distribution scoring
5 or more", ylab="Number of distributions")
title("Distribution of total score")
arrows(3,100,3,0,lwd=2)
dev.off()
6
Download