fitASPM: fitASPM fits an age-structured production model

View source: R/aspm.r

fitASPMR Documentation

fitASPM fits an age-structured production model

Description

fitASPM fits an age-structured produciton model that only has a single parameter - the unfished recruitment level R0.

Usage

fitASPM(initpar, infish, inglb, inprops, callfun = aspmLL)

Arguments

initpar

a vector of 2 or 3 numbers that are the initial parameter values given to the estimate of logR0, and the estimate of the variation around the CPUE data that the model is to be fitted to, and finally, the initial depletion.

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

callfun

the negative log-likelihoood used; either aspmLL or aspmPENLL

Value

a list containing the optim output

Examples

## Not run: 
data(dataspm)
fish <- dataspm$fish
glb <- dataspm$glb
props <- dataspm$props
pars <- c(14,0.3)
aspmLL(pars,fish,glb,props)      # should be -2.277029
bestspm <- fitASPM(pars,infish=fish,inglb=glb,inprops=props)
bestspm
fishery <- dynamics(bestspm$par,fish,glb,props)
round(fishery,4)

## End(Not run)

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