fitASPM | R Documentation |
fitASPM fits an age-structured produciton model that only has a single parameter - the unfished recruitment level R0.
fitASPM(initpar, infish, inglb, inprops, callfun = aspmLL)
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 |
a list containing the optim output
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.