Reproductive effort
Given the large number of very short calls in our data set and the
susceptibility of our sound monitor system to false positives to outside
noise or sudden movements of crickets within boxes, we followed standard
procedure and removed 5 seconds from each measurement and then rounded
any negative measurements to zero (see also Duffield et al., 2018,
2019). The final distribution of male calls indicated that calling
effort measurements were zero-inflated and overdispersed, and so we
analyzed the data using a zero-altered Poisson (ZAP) model fitted with
the package MCMCglmm (Hadfield, 2010). The ZAP model includes both a
logistic regression for the zero/non-zero component of the data (i.e.,
identifying which factors affect whether a male calls or not) and an
over-dispersed Poisson regression for the zero-truncated counts
(identifying which factors affect the amount of calling given that a
male calls).
We used binary indicator variables (0/1) to specify whether or not a
male belonged to each infection cue group and diet (Gelman and Hill,
2007). The reference group for our model was the naive infection cue and
the carbohydrate-biased (P:C 1:8) diet. Our predictors then included the
indicator for high protein (P:C 5:1) diet, 4 indicators for infection
cue, the interaction between diet and each infection cue, and also the
average amount of food eaten by that individual (centered at the mean
and scaled to standard deviation units). We ran the model for 550,000
iterations, with a burn-in of 50,000 and retaining every 100th sample.
Fixed effects are considered statistically significant if the 95%
highest posterior density credible intervals exclude 0. For model
diagnostics, we used visual checks of the thinned chains, and ran the
model 3 times to ensure convergence to a similar posterior distribution
(Gelman and Rubin, 1992). The model used an uninformative prior for the
Poisson regression and fixed the residual variance to 1 for the logistic
regression. To check that the posterior distributions were not heavily
influenced by the prior distributions, we ran the models with multiple
different prior specifications.