Estimate parameters for an EcoState model
ecostate(
taxa,
years,
catch = data.frame(Year = numeric(0), Mass = numeric(0), Taxon = numeric(0)),
biomass = data.frame(Year = numeric(0), Mass = numeric(0), Taxon = numeric(0)),
agecomp = list(),
weight = list(),
PB,
QB,
B,
DC,
EE,
X,
type,
U,
fit_B = vector(),
fit_Q = vector(),
fit_B0 = vector(),
fit_EE = vector(),
fit_PB = vector(),
fit_QB = vector(),
fit_eps = vector(),
fit_nu = vector(),
log_prior = function(p) 0,
settings = stanza_settings(taxa = taxa),
control = ecostate_control()
)
An object (list) of S3-class ecostate
. Elements include:
RTMB object from MakeADFun
The list of inputs passed to MakeADFun
The output from nlminb
The output from sdreport
Objects useful for package function, i.e., all arguments passed during the call
report file, including matrix B_ti
for biomass in each year
t
and taxon i
, g_ti
for growth rate per biomass,
and see dBdt
for other quantities reported by year
derived quantity estimates and standard errors, for rep
objects as requested
function call record
Total runtime
This S3 class then has functions summary
, print
, and
logLik
Character vector of taxa included in model.
Integer-vector of years included in model
long-form data frame with columns Mass
, Year
and Taxon
long-form data frame with columns Mass
, Year
and Taxon
, where Mass
is assumed to have the same units
as catch
a named list, with names corresponding to stanza_groups
,
where each list-element is a matrix with rownames for years
and colnames for integer ages, where NA excludes the entry from inclusion
and the model computes the likelihood across included ages in a given year,
and the rowsum is the input-sample size for a given year
a named list, with names corresponding to stanza_groups
,
where each list-element is a matrix with rownames for years
and colnames for integer ages, where NA excludes the entry from inclusion
and the model computes the lognormal likelihood for weight-at-age
in each specified age-year combination
numeric-vector with names matching taxa
, providing the
ratio of production to biomass for each taxon
numeric-vector with names matching taxa
, providing the
ratio of consumption to biomass for each taxon
numeric-vector with names matching taxa
, providing the
starting (or fixed) value for equilibrium biomass for each taxon
numeric-matrix with rownames and colnames matching taxa
,
where each column provides the diet proportion for a given predator
numeric-vector with names matching taxa
, providing the
proportion of proportion of production that is subsequently
modeled (termed ecotrophic efficiency)
numeric-matrix with rownames and colnames matching taxa
,
where each element gives the vulnerability parameter for a given
interaction.
character-vector with names matching taxa
and
elements c("auto","hetero","detritus")
,
indicating whether each taxon is a primary producer, consumer/predator, or
detritus, respectively.
numeric-vector with names matching taxa
, providing the
proportion of consumption that is unassimilated and therefore
exported to detritus
Character-vector listing taxa
for which equilibrium
biomass is estimated as a fixed effect
Character-vector listing taxa
for which the catchability
coefficient is estimated as a fixed effect
Character-vector listing taxa
for which the ratio of initial
to equilibrium biomass is estimated as a fixed effect
Character-vector listing taxa
for which ecotrophic
efficiency is estimated.
Character-vector listing taxa
for which equilibrium
production per biomass is estimated. Note that it is likely
a good idea to include a prior for any species for which this is estimated.
Character-vector listing taxa
for which equilibrium
consumption per biomass is estimated. Note that it is likely
a good idea to include a prior for any species for which this is estimated.
Character-vector listing taxa
for which the
model should estimate annual process errors in dB/dt
Character-vector listing taxa
for which the
model should estimate annual process errors in consumption Q_ij
A user-provided function that takes as input the list of
parameters out$obj$env$parList()
where out
is the output from
ecostate()
, and returns a numeric vector
where the sum is the log-prior probability. For example
log_prior = function(p) dnorm( p$logq_i[1], mean=0, sd=0.1, log=TRUE)
specifies a lognormal prior probability for the catchability coefficient
for the first taxa
with logmean of zero and logsd of 0.1
Output from stanza_settings()
, used to define age-structured
dynamics (called stanza-groups).
Output from ecostate_control()
, used to define user
settings.
All taxa
must be included in QB
, PB
, B
, and DC
,
but additional taxa can be in QB
, PB
, B
, and DC
that
are not in taxa
. So taxa
can be used to redefine the set of modeled
species without changing other inputs
Introducing the state-space mass-balance model:
Thorson, J. Kristensen, K., Aydin, K., Gaichas, S., Kimmel, D.G., McHuron, E.A., Nielsen, J.N., Townsend, H., Whitehouse, G.A (In press). The benefits of hierarchical ecosystem models: demonstration using a new state-space mass-balance model EcoState. Fish and Fisheries.