dynamics: dynamics describe the ASPM dynamics

View source: R/aspm.r

dynamicsR Documentation

dynamics describe the ASPM dynamics

Description

dynamics summarizes the dynamics of the Age-Structured Production Model (ASPM). Fitting the ASPM entails estimating the unfished recruitment level (R0), which is input as a parameter.

Usage

dynamics(pars, infish, inglb, inprops)

Arguments

pars

the dynamics relies on many parameters sitting in the global environment in particular ages, nages, maxage, M, maa, waa, sela, fish, and nyrs. 'pars' can contain either two or three parameters. 1) is the log-transformed average unfished recruitment, inR0. 2) is the variability around the index of relative abundance (cpue) during the fitting process, and if is present 3) is the initial depletion level initdepl, which if present will be fitted as well.

infish

the fish data.frame from readdata or built in dataset

inglb

the glb data.frame from readdata or built in dataset

inprops

the props data.frame from readdata or built in dataset

Value

a data.frame containing the fishery dynamics according to the input parameter inR0. In particular it includes teh Catch and PredC, and the CPUE and PredCE, which can be used in a maximum likelihood context.

Examples

## Not run: 
data(dataspm)
fish <- dataspm$fish
glb <- dataspm$glb
props <- dataspm$props
par <- c(glb$R0,0.20)  # not fitted to the data, this is just an initial guess
fishery <- dynamics(par,infish=fish,inglb=glb,inprops=props)
print(fishery)

## End(Not run)

haddonm/datalowSA documentation built on Nov. 5, 2023, 6:40 p.m.