Statistical approach
The analyses were done using Generalized Linear Mixed Models (with Poisson distribution). The software used was R 3.2.3 (the R-Project for Statistical Computing; //http:www.R-project.org) and the specific packages used were glmmTMB , function glmmTMB (Brook et al., 2017).
Three models were constructed. The first assessed whether the use of bad alternative hosts (Little Thornbirds) depended on the availability of optimal hosts (Great Kiskadees). The second model evaluated if the use of bad hosts was a function of the availability of good alternatives (Greater thornbirds). Finally, a third model assessed how availability of optimal hosts influenced the preference of good alternative hosts.
The study unit was the whole bird community present at the study area at a given week (Wi ). The response variables were the mean burdens of first instar larvae on nestlings of bad alternative hosts at a given week (first and second model), or of good alternatives (third model). This was estimated for each week by dividing the total number of L1 on all nestlings of the focal species by the total number of nestlings of that species present at that moment (i.e. baL1/ baNWi or gaL1/ gaNWi ). We used the count of L1 and not all instars because L1 represent recent infections (complete larval development takes approximately 4 days), and also because the success of larval development differs across species (e.g. most L1 fail to progress to subsequent instars in Little Thornbirds).
The independent variable of interest was the availability of optimal hots (first and third models) or good alternatives (second model). This was estimated by counting the number of broods present at the study site (40-ha forest patch) during a given week (ohBroodsWi or gaBroodsWi ). To take into account that the effect of host availability may depend on the parasite abundance in the area (host demand), the interaction between oh/gaBroodsWi and the total count of L1 in the whole bird community at a given week (tL1Wi ) was included, where tL1Wi is used as a proxy of parasite abundance (a large number of tL1 Wimeans that many gravid female flies were seeking hosts recently). This proxy is more precise and informative than using prevalence of infected nestlings or broods, taking into account that a gravid female of ’P. torquans c. A.’ may lay from 1 to 8 clutches of eggs, therefore being able of parasitising a single brood or several ones (Saravia-Pietropaolo et al. 2018). Additional independent variables were included to adjust for potential confounding. These were weekly precipitation (1, 2 or 1+2 weeks previously); minimum, maximum and mean weekly temperatures (same lags); count of broods of other bird species (potential hosts or non-hosts that are present simultaneously); and week of the breeding season (continuous variable, ranging from 1 to 40). All models included the random intercept ’breeding season ID’, to account for the lack of independence of observations of the same breeding season.
Model selection and comparison was carried out in a stepwise manner using Akaike information criteria (AIC) (Burnham et al. 2011). All models with AIC values no greater than 5 units compared to the best model were considered. Using information about the AIC values, the selected models were weighed, and then the multimodal inference was done using the weighed mean of the β coefficient and its standard error. The terms that were considered significant were those with a coefficient’s 95% confidence interval that did not include 0.