Skip to contents

Building model

Functions to prepare model parameters and control interaction states.

newAllometricParams()
Set up parameters for a model with allometric encounter and mortality rates
isAllometric()
Test whether a model has allometric encounter and mortality rates
makeInteracting()
Enable predator–prey interactions using an interaction matrix
makeNoninteracting()
Make model non-interacting
setFeedingLevel()
Set constant feeding level for each species in a non-interacting model

Calibrating model

Tools to match model output to empirical observations.

matchCatch()
Match the observed catch and yield
matchConsumption()
Match the model’s total consumption to observed estimates
matchGonadicProportionOnce()
Match the gonadic proportion of a species to a given value.
matchDiet()
Match the diet matrix of the model to an observed diet matrix
alignResource()
Align resource abundance to fish abundance
setResourceInteraction()
Set resource interaction to absorb external encounter rate

Working with Ecopath

Functions for importing and validating data.

addEcopathParams()
Add Ecopath parameters to species parameters
addEcopathCatchTotal()
Sets up gear parameters from Ecopath catch data
reduceEcopathDiet()
Reduce Ecopath diet matrix to mizer species
validEcopathParams()
Validate Ecopath parameter data frame
validEcopathCatch()
Validate Ecopath Catch data frame
fillDefaultsFromFishBase()
Fill Species Traits Using FishBase

Shiny gadget

Interactive interface for tuning mizer model parameters.

tuneEcopath() experimental
Launch shiny gadget for matching mizer model to Ecopath data
catchTab() catchTabUI()
Serve tab with catch data
deathTab() deathTabUI()
Serve tab with death plots
dietTab() dietTabUI()
Serve tab with diet plot
growthTab() growthTabUI()
Growth tab for tuning gadget
reproTab() reproTabUI()
Serve tab with plot of reproductive success rates
spectraTab() spectraTabUI()
tuneParams tab showing size spectra
exponentControl() exponentControlUI()
Controlling the allometric exponents
fishingControl() fishingControlUI()
Controlling the fishing parameters in the tuning gadget
matchControl() matchControlUI()
Controlling the matching
otherControl() otherControlUI()
Controlling the species parameters not included in other controls
reproductionControl() reproductionControlUI()
Controlling the reproduction parameters in the tuning gadget

Calculating rates

Extract rates and other parameters from the model.

getConsumption()
Get consumption rate for each species
getDiffusion()
Get diffusion rate
getUnassimilated()
Get unassimilated food
getProduction()
Get production rate as defined by Ecopath
getTotalProduction()
Get total production rate for each species
getSomaticProduction()
Get somatic production for each species
getGonadicProduction()
Get gonadic production for each species
getOffspringProduction()
Get rate at which offspring biomass is produced
getReproductiveLoss()
Get rate of biomass loss due to reproduction
getRespiration()
Get respiration rate as defined by Ecopath
getMetabolicRespiration()
Get metabolic respiration for each species
getEcotrophicEfficiency()
Get Ecotrophic Efficiency for each species
getM0B()
Get rate at which biomass is lost due to external mortality
getM2B()
Get rate at which biomass is lost due to predation mortality
getZB()
Get rate at which biomass is lost due to mortality
getDietMatrix()
Get diet matrix
getResourceEncounterRate()
Get resource encounter rate

Plotting

Basic visualisations

plotConsumptionVsSpecies()
Plot the Consumption against species
plotProductionVsSpecies()
Plot the production against species

Helper functions

Internal tools to support calibration and simulation.

prepare_data()
Prepare a TMB Objective Function for Optimising Model Parameters
update_params()
Function that updates params object with new parameter values
precompute_weights()
Precompute weights for integration of density over observed bins
valid_catch()
Validate and extract catch data for a single species

Obsolete?

Functions retained for compatibility or reference but not in active use.

matchEcopath() isEcopathMatched()
Match the model to the Ecopath data
matchExtMortOnce()
Match the external mortality to that required by the ecopath production rate.
matchProduction() matchProductionOnce() isProductionMatched()
Match the model's production rate to empirical observations/estimates
matchRespirationOnce()
Match the respiration rate to that required by the ecopath production rate.

Data sets

Example input and output objects for illustrating functions.

species_params_example
Example species parameters from a few Celtic Sea species.
ecopath_diet_example
Ecopath diet matrix from Lauria et al. (2016)
diet_matrix_example
Example reduced diet matrix for mizer