ecostate {ecostate} | R Documentation |
fit EcoState model
Description
Estimate parameters for an EcoState model
Usage
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()
)
Arguments
taxa |
Character vector of taxa included in model. |
years |
Integer-vector of years included in model |
catch |
long-form data frame with columns |
biomass |
long-form data frame with columns |
agecomp |
a named list, with names corresponding to |
weight |
a named list, with names corresponding to |
PB |
numeric-vector with names matching |
QB |
numeric-vector with names matching |
B |
numeric-vector with names matching |
DC |
numeric-matrix with rownames and colnames matching |
EE |
numeric-vector with names matching |
X |
numeric-matrix with rownames and colnames matching |
type |
character-vector with names matching |
U |
numeric-vector with names matching |
fit_B |
Character-vector listing |
fit_Q |
Character-vector listing |
fit_B0 |
Character-vector listing |
fit_EE |
Character-vector listing |
fit_PB |
Character-vector listing |
fit_QB |
Character-vector listing |
fit_eps |
Character-vector listing |
fit_nu |
Character-vector listing |
log_prior |
A user-provided function that takes as input the list of
parameters |
settings |
Output from |
control |
Output from |
Details
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
Value
An object (list) of S3-class ecostate
. Elements include:
- obj
RTMB object from
MakeADFun
- tmb_inputs
The list of inputs passed to
MakeADFun
- opt
The output from
nlminb
- sdrep
The output from
sdreport
- interal
Objects useful for package function, i.e., all arguments passed during the call
- rep
report file, including matrix
B_ti
for biomass in each yeart
and taxoni
,g_ti
for growth rate per biomass, and seedBdt
for other quantities reported by year- derived
derived quantity estimates and standard errors, for
rep
objects as requested- call
function call record
- run_time
Total runtime
This S3 class then has functions summary
, print
, and
logLik
References
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.