DOI: 10.5061/dryad.dbrv15fc8
title: Stream fish Bayesian size spectrum model

description: Biomass size spectra are useful tools for ecologists to investigate
 macroecological processes such as trophic energy transfer and
 productivity. However, little is known about how different methods of
 aggregating data across spatial scales of river networks may affect
 community size spectra results. We used size-binned data (0 – 2048 g) of
 fish assemblages from three Lake Ontario watersheds to compare fish size
 spectra slopes across multiple stream classification systems and the
 effects of sampling design on size spectra at broader spatial scales. The
 slope of individual site-based size spectra ranged from -2.901 to -1.382
 (median -1.718) while watershed-level size spectra had an average slope of
 -1.77. Size spectrum slopes did not differ across stream classes, though
 sites with salmonid species exhibited less negative slopes. Aggregated
 size spectra showed better model fit than individual site models
 regardless of stream order. Precision improved with stratified random
 sampling and larger sample sizes (&gt;15 sites) at the watershed
 scale. Aggregating sites using different strategies offers effective
 approaches for modeling size spectra, supporting investigations into
 macroecological processes in river ecosystems.
description: This repository includes model parameters for the size
 selectivity correction (b0.summary.csv; beta.summary.csv) and simulated
 stream fish data (samplefishdata.csv) that can be used in the described
 Bayesian size spectrum model. The fish data includes body size
 measurements, both length and weight, of all fish captured at the
 site.
description: # File Descriptions **b0.summary.csv** - Parameter value for the intercept
 in the size bias correction model. **beta.summary.csv** - Posterior
 distribution of the parameter value for the "size" predictor
 variable in the size bias correction model. The median (50%) value is used
 in the model in the associated R script. **samplefishdata.csv** - Example
 dataset of single-pass electrofishing fish assemblage data. Each row
 represents an individual fish that was captured at a specific site. The
 variables included in the dataset consist of: "SiteId" -
 Descriptor of the unique site(s) in the dataset; Length - Fork or total
 length of the individual fish (mm); and Weight - Total weight of the
 individual fish (g). **sizespectrum.model.jags** - The model that is used
 by the JAGS program to implement the Bayesian sampler. This file is
 generated by the R script and can be edited through R. **sizespectrum.R**
 - The R script that can be used to parameterize the Bayesian size spectrum
 model using the associated files in the repository. #
 bayesian-size-spectrum A Bayesian approach to parameterizing size spectrum
 models using electrofishing stream fish data (Richter et al., In Review).
 This approach is modified from Edwards et al. (2017) and focuses on using
 fish data to fit a Pareto distribution with binned size data to estimate
 the slope parameter of the size spectrum model. As this approach is
 primarily focused on stream fish assemblages, we incorporate a correction
 to the capture probability of stream fish due to the size selectivity that
 is associated with stream fish electrofishing samples (Richter et al.
 2022). The associated script for this model was written in R and uses the
 JAGS program
 ([https://sourceforge.net/projects/mcmc-jags/](https://sourceforge.net/projects/mcmc-jags/)) to implement the Bayesian sampler. We provide simulated fish catch data that can be used to parameterize a size spectrum model using the script. Model steps: * Assign all fish to size classes (log<sub>2</sub>-scale) * Determine the lower and upper limits of each size bin along with the size bin midpoints * Calculate the total catch for each size bin * Use the size selectivity correction model to calculate the capture probability for each size bin * Define input data for the model * Input parameters for JAGS program * Create model file (sizespectrum.model.jags) * Run the JAGS model * Save model output ## Data This repository includes model parameters for the size selectivity correction (b0.summary.csv; beta.summary.csv) and simulated stream fish data (samplefishdata.csv). The fish data includes body size measurements, both length and weight, of all fish captured at the site. ## Model structure The fish data is used to assign each captured fish to size bins (log<sub>2</sub>-scale). The model assumes that the size bin catches $\bf{c}$ follow a multinomial distribution ($`{\bf{c}} \sim \text{Multinomial}(n, \bf{p})`$) where $n$ represents the total catch and number of independent trials and $\bf{p}$ is the probability of observing a fish in each size bin. The probability of sampling a fish from size bin $b$ is the capture probability for that size bin ($q_{b}$) multiplied by the Pareto probability density function integrated across the size bin. The sampling probability is then standardized across all values to ensure their sum equaled 1 for the multinomial distribution. The sampling probabilty for size bin $b$ is:\ $`p_b = {q_b(x^{-\alpha}_{min,k} - x^{-\alpha}_{max,k}) \over \sum_k q_k(x^{-\alpha}_{min,k} - x^{-\alpha}_{max,k})}`$\ where $k$ is the number of size bins, $q_b$ is the capture probability for size bin $b$, $\alpha$ is the shape parameter of the Pareto distribution. $x_{min,b}$ and $x_{max,b}$ are the lower and upper limits of size bin $b$. This fitted Pareto distribution is essentially a truncated power law distribution and the focus of this model is to parameterize the shape parameter ($\alpha$) of the Pareto distribution, which is directly related to the slope of the size spectrum $\lambda$ ($\lambda = {(\alpha + 1)}$). The location parameter was assigned the value of the minimum body size used for analysis (1 g). For more details about the structure of the model, please refer to Richter et al. (In Review). ## References Edwards, A. M., Robinson, J. P., Plank, M. J., Baum, J. K., & Blanchard, J. L. (2017). Testing and recommending methods for fitting size spectra to data. Methods in Ecology and Evolution, 8(1), 57-67. [https://doi.org/10.1111/2041-210X.12641](https://doi.org/10.1111/2041-210X.12641)\ Richter, I. A., Giacomini, H. C., De Kerckhove, D. T., Jackson, D. A., & Jones, N. E. (2022). Correcting for size bias in electrofishing removal samples. Ecological Modelling, 467, 109929. [https://doi.org/10.1016/j.ecolmodel.2022.109929](https://doi.org/10.1016/j.ecolmodel.2022.109929)\ Richter, I. A., Giacomini, H. C., De Kerckhove, D. T., Jones, N. E., & Jackson, D. A. In Review. From individual sites to the entire watershed: variability in size spectrum models among stream fish communities.