#Make code wrap text so it doesn't go off the page when Knitting to PDF
library(knitr)
opts_chunk$set(tidy.opts=list(width.cutoff=60),tidy=TRUE)
Cite as: McCune KB, McElreath R, Logan CJ. 2019 Investigating the use of learning mechanisms in a species that is rapidly expanding its geographic range. (version: 11 Oct 2019) In principle recommendation by PCI Ecology.
This preregistration has been pre-study peer reviewed and received an In Principle Recommendation by:
Aliza le Roux (2019) How would variation in environmental predictability affect the use of different learning mechanisms in a social bird? Peer Community in Ecology, 100032. 10.24072/pci.ecology.100032
This is one of many studies planned for our long-term research on the role of behavior and learning in rapid geographic range expansions. Project background: Behavioral flexibility, the ability to change behavior when circumstances change based on learning from previous experience (Mikhalevich, Powell, and Logan 2017), is thought to play an important role in a species’ ability to successfully adapt to new environments and expand its geographic range (e.g., (Lefebvre et al. 1997), (Griffin and Guez 2014), (Chow, Lea, and Leaver 2016), (Sol and Lefebvre 2000), (Sol, Timmermans, and Lefebvre 2002), (Sol et al. 2005)). However, behavioral flexibility is rarely directly tested at the individual level, thus limiting our ability to determine how it relates to other traits, which limits the power of predictions about a species’ ability to adapt behavior to new environments. We use great-tailed grackles (a bird species) as a model to investigate this question because they have rapidly expanded their range into North America over the past 140 years ((Wehtje 2003), (Peer 2011)) (see an overview of the 5-year project timeline). Behavioral flexibility was likely necessary for this species to adapt to novel environments during the range expansion. For example, as a tropical species, great-tailed grackles were likely only able to expand through, and persist in, the desert of the southwest United States after humans modified the landscape by building canals and other methods of irrigation (Wehtje (2003)). Although grackles continue to be associated with similarly urban habitats across the range and use human-provided sources of food, one challenge grackles may have to overcome in these novel environments is gaining the ability to recognize and exploit the new stimuli that indicate natural sources of food and water. Similarly, grackles may only be able to survive the harsh winters in the most northern parts of the current range, when invertebrate prey are more scarce, because large sources of grain from cattle feedlots have become more common (Wehtje (2003)). This investigation: The ability to learn individually, or from others, could allow grackles to flexibly change their behavior in response to changing environmental conditions. In this piece of the long-term project, we aim to determine what learning mechanisms grackles use (i.e., stimulus or local enhancement, imitation/emulation, personal information) when learning to solve novel foraging problems. We will use two puzzle box apparatuses that contain food accessible via diverse opening methods. Wild grackles will first be habituated to eating from or off of the non-functional apparatus so that differences in neophobia will not confound performance. We will test grackles from a population in the middle of the expanded geographic range to determine whether this species uses social learning. If so, we will then compare performance across three populations (core, middle of the expansion, and at the northern range edge). Results will indicate how social learning might play a role in the geographic range expansion by elucidating how this species solves novel foraging problems in the wild.
This preregistration was written (2017) and submitted to Peer Community in Ecology for pre-study peer review (Jul 2019) prior to collecting any data.
P5: Individuals from the population on the edge of the grackle range will solve more options faster and rely more on social learning than grackles from the middle of the expanded range, and the original core of the range. This may occur because social information is particularly useful to individuals in novel environments (e.g., the social learning strategy of “copy when uncertain” (Laland 2004)).
P5 alternative 1: Individuals from the population in the core of the grackle range will solve more options faster and rely more on social information than grackles from the middle and the edge of the expanded range. This may occur because the lack of novelty in the endemic range may result in grackles predominantly using individual learning (i.e., producers) which leads to the production of reliable public social information. When social information is consistently high quality, individuals may be selected to preferentially use available social information to navigate unusual novel situations (e.g. social learning strategy of “copy if rare” Laland (2004)).
P5 alternative 2: Individuals from the the middle of the expanded range will solve more options faster and rely more on social information than grackles from the population on the edge of the grackle range, and the original core of the range. This is potentially because population densities might be higher in the middle of the expanded range, therefore there might be more within-species competition for resources such that grackles may be selected to pay increased attention to conspecifics.
P5 alternative 3: There will be no difference in the number of options solved, the speed at which they switch between solving options, and the reliance on personal versus social information on the learning task across grackle populations. This is potentially because grackles in each population are equally social and generalist foragers ((Giraldeau 1996)), measured in a separate preregistration (http://corinalogan.com/Preregistrations/g_flexforaging.html) and rely on a mixture of personal and social information.
P6: Grackles will show repeatable performance on the learning task over sequential trials with two functionally similar but visually distinct apparatuses (Logan et al. (2016), McCune (2018)). This would indicate that behavioral interactions with the task result from inherent learning abilities.
P6 alternative 1: Grackles will not show repeatable learning performance on the two apparatuses. This could happen for several reasons. First, it may indicate that the two apparatuses may vary in difficulty and so performance on one is not predictive of performance on the other. Second, the distinct visual appearance of the two apparatuses could differentially stimulate behavioral responses that lead to variation in performance (i.e., one apparatus has clear plastic doors therefore the food is visible, while the food is not visible in the other apparatus). Third, grackles may learn to solve the second learning apparatus more quickly after having already learned to solve the first apparatus.
Great-tailed grackles are caught in the wild in Tempe, Arizona USA and at two additional field sites in future years (core and edge populations) for individual identification (colored leg bands in unique combinations) until as much of the population is banded as possible (62 have been marked in Tempe as of 17 Sept 2019). Great-tailed grackles are a highly social species that roosts together at night and forages in groups during the day during the non-breeding season, while during the breeding season one or more males defend a territory with multiple nests built by females who care for young (Johnson and Peer (2001)). Based on our current trapping efforts in Arizona, many grackles have overlapping home ranges and when a large, temporary source of food is available, grackles will gather in groups of 3 - 15 birds. Additionally, there is some site-fidelity where the same individuals can be reliably found in the area close to where they were caught.
Some individuals (~6-16) will be brought temporarily into aviaries where they will be trained on a particular locus of the apparatus. After a maximum of 6 months, these individuals will be released back to the wild to serve as demonstrators for the experiment, which will occur in the wild (in the same way as Logan et al. (2016), except in the wild). We will attempt to train grackles in the aviaries on one solving method per bird, per apparatus, for the two visually distinct but functionally similar apparatuses (Logan et al. (2016), McCune (2018)). However, if the solving methods on one apparatus are too difficult for the aviary grackles to learn quickly, then we will only use the easier apparatus for the experiment in the wild and we will not test H3.
We will conduct the social learning experiments in an area where the home ranges of many color-marked grackles overlaps. We will encourage continued attendance to this area by pre-baiting it every day for several weeks. Based on previous trapping efforts, and experiments described elsewhere (i.e. http://corinalogan.com/Preregistrations/g_exploration.html), we believe we will have learning mechanism group sizes of approximately 8 color-marked grackles.
We will use two functionally similar, but visually distinct apparatuses (Fig. 1) to test social learning in this species. The first apparatus is a log that has 4 compartments (loci) covered by transparent doors that open in different ways (McCune (2018)). The top door opens up like a hatch, the left side door opens out like a car door, the front door pulls out like a drawer, and the right side door pushes in. Three of the 4 doors also have locks to increase the difficulty of the task. The lock on top is a stick that can be pushed or pulled to unblock the door, the lock on the left side is a stick that swivels up or down over the door, and the lock on the front is a hook-and-eye style lock that attaches to the handle to hold the drawer in place.
The second apparatus has three loci for accessing food (Logan et al. (2016)). One locus had two methods for accessing the same food compartment, giving a total of four different options for solving the task (Fig. 1). The food in the compartment at locus 1 can be accessed by pushing a swiveling door from the left to the right and putting the bill in the food compartment (‘Vflap’ option) or by pushing the same swiveling door from the right to the left and poking the bill through a piece of rubber to access the same food compartment (‘Vrubber’ option). At locus 2, food can be obtained by lifting up a wooden flap (‘Hflap’ option) to expose the compartment. At locus 3, food is obtained by inserting the bill through a hole in the side of the apparatus (‘Hside’ option) that accessed the same food compartment as Hflap.
Each group will have at least one demonstrator trained to open a locus on one of the two apparatuses. This experiment involves an open-diffusion design with wild birds, so any individual that interacts with a solving option will automatically become a demonstrator. Our open-diffusion analysis accounts for this by examining not only who solved (or attempted to solve) which option, but also who was watching them solve or attempt to solve, and then measures the change in behavior of the observer.
All trials will be video recorded from multiple angles or by using a camera with a fisheye lens to ensure that we can see all loci on both apparatuses and identify all of the observers. All data will be collected from scoring the videos.
Each group will be given time to habituate to non-functional apparatuses prior to starting social learning trials. We will put out the apparatuses with food on and around them until the majority of grackles are eating comfortably. Each locus on the apparatuses will be disabled during this habituation period so that grackles cannot learn solving methods. During social learning trials, we will conduct a maximum of eight sessions of up to 45 minutes per apparatus type per group. A group is defined as having the same trained demonstrator(s) in the presence of many of the same conspecifics across the sessions. For the control group (with no trained demonstrator), the group must have many of the same individuals as in the first session. We will stop this experiment after each group has completed 8 sessions per apparatus or when we must move to the next field site (summer 2020), whichever comes first. At that point, we will analyze the Arizona (middle field site) data to determine whether social learning occured. If not, we will not conduct this test in the other populations. If so, we will conduct this test in the other two populations (core and edge) over the course of one year at each site.
When the study is complete, the data will be published in the Knowledge Network for Biocomplexity’s data repository.
In the population in the middle of the expanded range, we will attempt to counterbalance demonstrators among the three groups such that each group will observe a demonstrator that was trained in a distinct solving method, and observers in each group will not be exposed to other demonstrators using different opening methods. If we are able to train demonstrators on solving methods for both of the apparatuses, then we will counterbalance which group sees which apparatus type first (counterbalanced order determined at random.org where P=plank apparatus from Logan et al. (2016) and L=log apparatus from McCune (2018). Edge: plank then log; middle: group 1=plank then log, group 2=plank then log, group 3=log then plank; core: log then plank). We will train half of the demonstrators in the core and edge populations (one group per population) on one solving method and the other half of the demonstrators on the other method for each of the two apparatus types.
No blinding is involved in this study.
Latency to attempt to solve a particular locus
Latency to solve (obtain the food) a particular locus
Locus on the apparatus (plank: horizontal side, horizontal flap, vertical flap, or vertical rubber; log: doors A-D)
ID
Group ID
The number of times the naive focal individual observed conspecifics attempting/solving at a particular locus before the focal individual’s first interaction at that locus
Binary variable indicating whether the focal individual saw another individual succeed (obtain food) or just attempt (did not obtain food) a particular locus before the focal individual’s first interaction at that locus
The number of successes a focal individual had at other loci before attempting a novel locus (asocial learning)
Which apparatus (left or right) was observed or interacted with
Sex
Age
Dominance rank
Population (core, middle, edge)
Random effect: ID (to allow for multiple events from the same individual)
NOTE: we will run one model per dependent variable per apparatus type (plank or log).
Apparatus
Sex
Age
Dominance rank
Population (core, middle, edge)
Random effect: ID (to partition within individual and between individual variance in performance to calculate an intraclass correlation coefficient [ICC])
We do not plan to exclude any data. When missing data occur, the existing data for that individual will be included in the analyses for the sessions they participated in. Analyses will be conducted in R (current version 4.0.3; R Core Team (2017)). When there is more than one experimenter collecting data, experimenter will be added as a random effect to account for potential differences between experimenters in conducting the sessions.
The data will be checked for overdispersion, underdispersion, zero-inflation, and heteroscedasticity with the DHARMa R package (Hartig 2019) following methods by Hartig. Additionally, prior to survival analysis we will verify that independent variables to not violate the assumption of proportional hazards (Machin, Cheung, and Parmar 2006).
The analysis will be conducted as in Logan et al. (2016) with a survival analysis (Cox proportional hazards model), using ID as a random effect, that is sensitive to the order and latency of events at each locus. We will model the rate at which individual i in group j first attempted method l at locus k as a function of predictor variables (e.g., age, sex, rank). This method accounts for previous attempts by the subject as well as observations of others attempting and solving the loci.
data1 <- read.csv ("/Users/corina/GTGR/data/data_reverse.csv", header=T, sep=",", stringsAsFactors=F)
# DATA CHECKING
library(DHARMa)
library(lme4)
#Latency to solve
simulationOutput <- simulateResiduals(fittedModel = MCMCglmm(latencysolve ~ Locus + Group ID + StartTime + ObservedAnother + Apparatus + Sex + Age + Rank + Population + (1|ID), family=poisson, data=data1), n=250) #250 simulations, but if want higher precision change n>1000
simulationOutput$scaledResiduals #Expect a flat distribution of the overall residuals, and uniformity in y direction if plotted against any predictor
testDispersion(simulationOutput) #if under- or over-dispersed, then p-value<0.05, but then check the dispersion parameter and try to determine what in the model could be the cause and address it there, also check for zero inflation
testZeroInflation(simulationOutput) #compare expected vs observed zeros, not zero-inflated if p<0.05
testUniformity(simulationOutput) #check for heteroscedasticity ("a systematic dependency of the dispersion / variance on another variable in the model" Hartig, https://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html), which is indicated if dots aren't on the red line and p<0.05. Also...
plot(simulationOutput) #...there should be no pattern in the data points in the right panel
plotResiduals(ReverseNumber, simulationOutput$scaledResiduals) #plot the residuals against other predictors (in cases when there is more than 1 fixed effect) - can't get this code to work yet
#Latency to attempt to solve
simulationOutput <- simulateResiduals(fittedModel = MCMCglmm(latencyattempt ~ Locus + Group ID + StartTime + ObservedAnother + Apparatus + Sex + Age + Rank + Population + (1|ID), family=poisson, data=data1), n=250) #250 simulations, but if want higher precision change n>1000
simulationOutput$scaledResiduals #Expect a flat distribution of the overall residuals, and uniformity in y direction if plotted against any predictor
testDispersion(simulationOutput) #if under- or over-dispersed, then p-value<0.05, but then check the dispersion parameter and try to determine what in the model could be the cause and address it there, also check for zero inflation
testZeroInflation(simulationOutput) #compare expected vs observed zeros, not zero-inflated if p<0.05
testUniformity(simulationOutput) #check for heteroscedasticity ("a systematic dependency of the dispersion / variance on another variable in the model" Hartig, https://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html), which is indicated if dots aren't on the red line and p<0.05. Also...
plot(simulationOutput) #...there should be no pattern in the data points in the right panel
plotResiduals(ReverseNumber, simulationOutput$scaledResiduals) #plot the residuals against other predictors (in cases when there is more than 1 fixed effect) - can't get this code to work yet
The analysis will be conducted as in Barrett, McElreath, and Perry (2017) using multilevel experience-weighted attraction models that can determine how individuals accumulate experience and the probability of an option being chosen. We will also use this analysis to investigate P1-P5.
We will only conduct this analysis if we are able to train demonstrator grackles in aviaries on solving methods for both apparatuses. If so, wild grackle groups will receive sequential trials with first one apparatus, then the second apparatus, and we will be able to run the analysis on repeatability of performance.
data1 <- read.csv("/Users/corina/GTGR/data/data_reverse.csv",
header = T, sep = ",", stringsAsFactors = F)
# REPEATABILITY GLMM
library(MCMCglmm)
prior = list(R = list(R1 = list(V = 1, nu = 0)), G = list(G1 = list(V = 1,
nu = 0)))
learn.rpt <- MCMCglmm(latencyattempt ~ Apparatus + Sex + Age +
Rank + Population, random = ~ID, family = "poisson", data = data1,
verbose = F, prior = prior, nitt = 13000, thin = 10, burnin = 3000)
summary(learn.rpt)
# autocorr(learn.rpt$Sol) #Did fixed effects converge?
# autocorr(learn.rpt$VCV) #Did random effects converge?
# In MCMCglmm, the latent scale adjusted repeatability and
# its credible interval can simply be obtained by:
rpt <- learn.rpt$VCV[, "ID"]/(learn.rpt$VCV[, "ID"] + learn.rpt$VCV[,
"units"]) #latent scale adjusted repeatability and its credible interval
mean(rpt)
var(rpt)
posterior.mode(rpt)
HPDinterval(rpt, 0.95)
# Repeatability on the data/observed scale (accounting for
# fixed effects) code from Supplementary Material S2 from
# Villemereuil et al. 2018 J Evol Biol
vf <- sapply(1:nrow(learn.rpt[["Sol"]]), function(i) {
var(predict(learn.rpt, it = i))
}) #estimates for each iteration of the MCMC
repeataF <- (vf + learn.rpt$VCV[, "ID"])/(vf + learn.rpt$VCV[,
"ID"] + learn.rpt$VCV[, "units"]) #latent scale adjusted + data scale
posterior.mode(repeataF)
HPDinterval(repeataF, 0.95)
# Now compare with the raw repeatability: null model
learn.raw <- MCMCglmm(latencyattempt ~ 1, random = ~ID, family = "poisson",
data = data1, verbose = F, prior = prior, nitt = 13000, thin = 10,
burnin = 3000)
summary(learn.raw)
repeataraw <- learn.raw$VCV[, "ID"]/(learn.raw$VCV[, "ID"] +
learn.raw$VCV[, "units"]) #latent scale adjusted repeatability and its credible interval
posterior.mode(repeataraw)
HPDinterval(repeataraw, 0.95)
This research is carried out in accordance with permits from the:
This research is funded by the Department of Human Behavior, Ecology and Culture at the Max Planck Institute for Evolutionary Anthropology.
We, the authors, declare that we have no financial conflicts of interest with the content of this article. Corina Logan is a Recommender and on the Managing Board at PCI Ecology.
We thank our PCI Ecology Recommender, Aliza le Roux, and our reviewers, Matthew Petelle and an anonymous reviewer, for their valuable feedback that improved this preregistration; Ben Trumble for providing us with a wet lab at Arizona State University and Angela Bond for lab support; Melissa Wilson Sayres for sponsoring our affiliations at Arizona State University and lending lab equipment; Kevin Langergraber for serving as local PI on the ASU IACUC; Kristine Johnson for technical advice on great-tailed grackles; Arizona State University School of Life Sciences Department Animal Care and Technologies for providing space for our aviaries and for their excellent support of our daily activities; Julia Cissewski for tirelessly solving problems involving financial transactions and contracts; and our research assistants: Aelin Mayer, Nancy Rodriguez, Brianna Thomas, Aldora Messinger, Elysia Mamola, Michael Guillen, Rita Barakat, Adriana Boderash, Olateju Ojekunle, August Sevchik, Justin Huynh, Jennifer Berens, Amanda Overholt, and Michael Pickett.