Experiment One
We used the lme4 () package to examine whether pesticide type, class, or chemical identity explained the greatest amount of variation in snail biomass. To do so, we separately predicted infected and uninfected B. glabrata and B. truncatus biomass using a categorical random term for pesticide, nested within class, nested within type to account for the nested structure of our experimental design (1 | type / class / chemical). These models did not consider the control tanks because they were not hierarchically nested. To determine whether our nested experimental treatments had significant effects on snails, we then performed a likelihood ratio test to compare a full nested model for each snail species to a null (intercept only) linear model that did not include the random effect. If our nested model was significant, we then used the experimental level that explained the most variation in snails as a fixed categorical predictor of either infected or uninfected B. glabrata or uninfected B. truncatus total snail biomass using separate regressions with a Gaussian error distribution in the glmmTMB package (Brooks et al., 2017) in R v4.0 (RCoreTeam, 2013). We did not analyze infectedB. truncatus biomass due to very low egg viability, and, thus, infection rates for this species (Table S3). For each response, we also fit models including a random term for spatial block and/or a term for zero-inflation. We considered models having water and solvent tanks treated separately or combined as one control group, resulting in 9 possible models for each species. We ranked models using AICc values, and assessed significance of predictors for each response only for the model with the lowest AICc value (Tables S4-S6). We plotted the results of our regression models using the visreg package (Rosseel, 2012).
A combined factor and path analysis was used for the first experiment to explore potential causal pathways of agrochemicals on snail egg production and biomass using the lavaan package (Rosseel, 2012) in R statistical software (RCoreTeam, 2013). Because our sample size of 75 tanks restricted the number of causal pathways we could infer, we first constructed a latent variable for phytoplankton chlorophyll a (F0) in all weeks, periphyton chlorophyll a (F0) in all weeks, snail egg counts in all weeks, andH. verticillata abundance in all weeks (1-12). For each latent variable, we used modification indices to add any missing covariances until each model fit the observed data (CFI > 0.95). The scores for each latent variable model were then extracted using the predict function in lavaan and used for construction of final structural equation models to separately predict Bi. glabrata and Bu. truncatus biomass (Tables S7-S8). We examined pathways that were previously known for agrochemicals i.e. top down-effects of insecticides on snail predators and bottom-up effects of fertilizer or herbicide on periphyton (Halstead et al., 2018). We also examined d-separate tests and included any potential missing pathways until our model had a good fit to observed data