GAMM for Intra-annual Shift Toward Frugivory
We used a Generalized Additive Mixed Model (GAMM) in this analysis to investigate the non-linear shift toward frugivory throughout the calendar year, as outlined by Pedersen et al. (2019). For this purpose, we employed the ordbetareg package (Kubinec 2022), which acts as a wrapper for the Bayesian brms package (Bürkner 2017, 2018, 2021). We decided on this combination of a GAMM with the ordbetareg package because of the combined suitability for handling the zero-inflated, ordered, and proportional characteristics of the response variable. Ordered beta regressions, like the one we applied here, enabled us to model relationships between the lower bound (0), upper bound (1), and the continuous proportions in between without overfitting the model to the data (Kubinec 2022).
To investigate nonlinearity in frugivory over the calendar year, we specified the calendar day in which samples were collected as the smooth predictor with the response variable representing the proportion of fecal volume attributed to fruit. This approach allowed us to visualize frugivory patterns over time. To account for variability in frugivory among individuals and sites, we introduced a random effect that represented the individual providing each sample. Since individuals were nested entirely within the three sites, the site-level variances were inherently captured in the individual tortoise random effect terms, simplifying the model.