getJacobianEnergyFlux: Jacobian matrix with interaction strengths

View source: R/get_jacobian.R

getJacobianEnergyFluxR Documentation

Jacobian matrix with interaction strengths

Description

This functions calculates interaction strengths from a resolved energy-flux food web model and uses these values as entries for a Jacobian matrix. The diagonal can be calculated from the model (default), all-zero, or user-defined. This function is an implementation of the equations from the references listed below.

Usage

getJacobianEnergyFlux(
  FM,
  BM,
  AE,
  GE,
  diagonal = "model",
  dead = NULL,
  externals = NULL,
  MR = NULL,
  verbose = TRUE,
  netMatrix = TRUE
)

Arguments

FM

(required) A named square flowmatrix, source compartments as rows, sink compartments as columns.

BM

(required) A named numeric vector with biomasses of all compartments, must be in the same order as the flow matrix FM after externals are excluded (see externals).

AE

(required) A named numeric vector with assimilation efficiencies of all compartments, must be in the same order as the flow matrix FM after externals are excluded. AE should be set to NA for dead/non-faunal compartments (see dead).

GE

(required) A named numeric vector with growth efficiencies of all compartments, must be in the same order as the flow matrix FM after externals are excluded. GE should be set to NA for dead/non-faunal compartments (see dead and externals).

diagonal

(required) Either the string "model" (default), a single value, or a numeric vector.

  • The string "model" calculates the diagonal values from flux values.

  • A single value will set all diagonal values to this number.

  • A vector will set the diagonal to this user-specified diagonal.

dead

(optional) List with at most two elements named names and frac containing information on all dead compartments (like detritus and nutrients).

  • The element names is required and contains a character vector with all names of dead compartments.

  • The element frac is required if there are multiple dead compartments, and is a matrix the same size and order as the FM matrix with the fraction of each flow that is defecation. If there are multiple defecation compartments, the FM combined with frac is used to calculate the relative distribution of matter into the specified defecation compartments.

externals

(optional) Character vector with all names of external compartments, i.e. which have no biomass, that have to be removed from the flow matrix before calculations.

MR

(optional) Mortality rates for all compartments per unit time (t-1). Default behaviour (MR = NULL) is calculation of mortality rates as (growth - predation)/biomass. Otherwise, you can provide a named numeric vector.

verbose

(optional) Default is TRUE. Whether or not to print messages.

netMatrix

(optional) Boolean. Default is TRUE: the netMatrix is used to calculate interaction strengths. This is only relevant if there are two food web compartments which act both as prey and predators to one another.

Details

If MR is set to NULL, it is calculated from the model as the non-predatory mortality: production minus predation divided by biomass. Otherwise MR can sometimes be extracted from the food web model, for example when natural death results in a flux from the faunal compartment to a carcass compartment. Diving the mortality flux by the biomass of the faunal compartment gives the specific mortality rate per unit time. Mortality rate can also be calculated as the inverse of the natural lifespan of the species (per unit time).

Value

This function returns a matrix containing interaction strengths, i.e. the effect of the resources (rows) on the consumers (columns) - for all interactions in the food web.

References

  • de Ruiter, P.C., Neutel, A.M., Moore, J.C., 1995. Energetics, Patterns of Interaction Strengths, and Stability in Real Ecosystems. Science. 269, 1257–1260. https://doi.org/10.1126/science.269.5228.1257

  • Neutel, A.M., Heesterbeek, J.A.P., Ruiter, P.C. De, 2002. Stability in Real Food Webs: Weak Links in Long Loops. Science. 296, 1120–1123. https://doi.org/10.1126/science.1068326

  • Neutel, A.M., Thorne, M.A.S., 2014. Interaction strengths in balanced carbon cycles and the absence of a relation between ecosystem complexity and stability. Ecol. Lett. 17, 651–661. https://doi.org/10.1111/ele.12266

  • Moore, J. C., Berlow, E. L., Coleman, D. C., De Ruiter, P. C., Dong, Q., Hastings, A., … Wall, D. H. (2004). Detritus, trophic dynamics and biodiversity. Ecology Letters, 7(7), 584–600. https://doi.org/10.1111/j.1461-0248.2004.00606.x

Examples

# Use example food-web model of soil
model <- fwmodels::LovinkhoeveCP
# Create a Jacobian matrix
JM <- getJacobianEnergyFlux(
  FM = model$FM,
  BM = model$BM,
  AE = model$AE,
  GE = model$GE,
  diagonal = "model",
  dead = model$dead,
  MR = model$MR
)

dswdejonge/fwstability documentation built on Dec. 7, 2022, 7:24 p.m.