(b) Model structure
To compare our hypotheses, we fit generalized linear mixed effect models
(GLMMs) using the lme4 package v.1.1.26 (Bates et al. 2014). This mixed
effects framework allowed us to account for other factors that could
influence genetic diversity but that were not the focus of our study.
For models with log-transformed π as the response variable, we used a
Gaussian error term. For models with He orHd as the response variable, we used a binomial
error term, and transformed He orHd into columns of heterozygotes and homozygotes.
The number of heterozygotes was calculated by multiplying the sample
size in individuals (n ) by He orHd . The number of homozygotes was calculated by
multiplying the sample size by (1 - He ) or (1 -Hd ). For the mtDNA models ofHd , the length of the marker in base pairs was
included as an explanatory variable. For the microsatellite models, we
included whether or not the microsatellite primer was cross-species
amplified. We incorporated the source (the study the data came from) as
a random effect for all models, while marker name (the specific mtDNA
marker used) was added as a random effect for the mtDNA models. To
account for overdispersion, an observation-level random effect was
included for the microsatellite models (Harrison 2015). Finally, a
nested genus/family random effect was added to all models to account for
phylogenetic relationships.
For each estimate of diversity (π, Hd , orHe ), we fit a series of five models to identify
geographic patterns: (1) a baseline model with just the terms and random
effects specified above, (2) a latitude model, (3) an absolute latitude
model, (4) a longitude model, (4) a latitude and longitude model, and
(5) an absolute latitude and longitude model. The latitude and longitude
models contained the predictor variable of interest (e.g. latitude,
longitude, etc.) in addition to the baseline model structure. Latitude,
absolute latitude, and longitude were all scaled (mean = 0, variance =
1), latitude was included as a quadratic term, and longitude was
incorporated as a smoothing spline using the R package splines v.4.2.2
(R Core Team 2023).
We used the same model structure to compare macroecological drivers of
genetic diversity. As with the latitude and longitude models, we fit a
series of models that each incorporated one environmental variable of
interest. The environmental variables were sea surface temperature (SST)
(°C; expressed as mean, maximum, minimum, and range) and chlorophyll
(mg/m3; mean, maximum, minimum, and range).
Chlorophyll was included as a quadratic term. All environmental data
were monthly climatologies (9.2 km2 resolution) and
were extracted from Bio-ORACLE (Assis et al. 2017; Tyberghein et al.
2012) using the R package sdmpredictors v.0.2.10 (Bosch & Fernandez
2021).