ecostate model description
James T. Thorson
Source:vignettes/model-description.Rmd
model-description.Rmd
Introducing ecostate
ecostate
(Thorson et al.
2025) is an R package that implements a nonlinear state-space
model representing equilibrium conditions from Ecopath (Polovina 1984), biomass dynamics from Ecosim
(Walters, Christensen, and Pauly 1997),
and age/stage-structured dynamics from Ecosim version-2 (Walters et al. 2000). The parameterization is
heavily inspired by RPath (Lucey, Gaichas, and
Aydin 2020). However, it also adds features that are not
available in EwE or Rpath including:
Estimating equilibrium and dynamical parameters simultaneously: ecostate uses maximum likelihood estimation to identify the values (and standard errors) for parameters representing both ecosystem equilibrium (e.g., equilibrium biomass, production/consumption per biomass), ecosystem dynamics (e.g., ratio of initial to equilibrium biomass), and measurement parameters (e.g., catchability coefficient);
Process errors: ecostate can estimate errors in both biomass index and catch measurements, as well as unexplained variation in dynamics (termed “process errors”). It then estimates the variance of process errors using hierarchical modelling techniques;
Priors and likelihood penalties: ecostate allows the user to specify a Bayesian prior or likelihood penalty on parameters, rather than fixing them a priori.
These features ensure that anyone running ecostate can rapidly update the model using new data or ecosystem assumptions. Results can then be exactly reproduced, allowing model performance to be explored via simulation modelling.
State-space mass balance modelling
The model starts by defining equilibrium biomass for each taxon , and using and to refer to taxa when they are prey or predator. Every taxon is defined as a heterotroph (consumer), autotroph (producer), or detritus pool, which affects dynamics as explained later. This equilibrium depends upon prey production per biomass , the proportion of prey production that is explained in the model (termed “ecotrophic efficiency”) , diet proportion for each predator and prey , and predator consumption per biomass :
$$ \underbrace{\bar{\beta}_i}_{\text{Equilibrium biomass as prey}} \times \underbrace{p_i}_{\text{Prey production per biomass}} \times \underbrace{e_i}_{\text{Ecotrophic efficiency}} = \\ \sum_{j=1}^S{\left( \underbrace{d_{i,j}}_{\text{Proportion of diet for predator }j \text{ by prey }i} \times \underbrace{\bar{\beta}_j}_{\text{Equilibrium biomass for predator }j} \times \underbrace{w_j}_{\text{Predator consumption per biomass}} \right)} $$ Autotroph and detritus taxa have no consumption so for these taxa. We can then solve for the matrix of equilibrium consumption as:
Given these equilibrium values, we then define a differential equation for biomass dynamics which we integrate over time to calculate biomass at times . In parallel, we also integrate catches over time, while resetting at the beginning of each time-interval and recording the integrated catch at the end of each interval:
where biomass growth rate and natural mortality rate are calculated from predicted consumption representing the mass of prey consumed by predator , and fishing mortality is an estimated parameter that is informed by catch data.
Consumption varies around the equilibrium consumption:
where is the matrix of predator-prey vulnerability parameters .
Natural mortality is then calculated as:
where residual natural mortality accounts for predation by unmodeled taxa, senescence and disease.
The residual mortality rate is defined differently for detritus than other taxa, and this detritus loss rate is defined to ensure that net detritus accumulation matches net consumption plus export at equilibrium:
where is the proportion of consumption that is not assimilated for predator such that flows to detritus via unassimilated consumption. Similarly, is unexplained mortality which we assume flows to consumption with total .
Biomass growth rate is also calculated from consumption: This expression states that:
Heterotrophs: The growth rate for heterotrophs is consumption per biomass times the ratio of production and consumption per biomass;
Autotrophs: The autotroph growth rate is calculated so that production is constant but adjusted by a Type-2 functional response using vulnerability ;
Detritus: The detritus growth rate is total detritus gain per detritus biomass.