plotASPM: plotASPM plots catch, CPUE, Spawning Biomass and Harvest Rate

View source: R/aspm.r

plotASPMR Documentation

plotASPM plots catch, CPUE, Spawning Biomass and Harvest Rate

Description

plotASPM after running fitASPM the optimum parameters can be put through the dynamics function to generate a dataframe containing the optimum dynamics. These can be plotted using plotASPM, which plots out the catches, the Spawning Biomass, the relative CPUE and its fit to the observed CPUE, and the harvest rate. This routine is still under development to include more options.

Usage

plotASPM(infish, CI = NA, defineplot = TRUE, target = 0.48, usef = 7, png = "")

Arguments

infish

an object generated by the dynamics function

CI

defaults to NA, if confidence intervals around the cpue have been obtained using getLNCI, then the resulting matrix will generate 95pc CIs

defineplot

define the plot size and character outside the plot or automatically inside. Defaults to TRUE

target

target depletion level. Defaults to 0.48

usef

defines the font to use usef(ont),default = 7 bold times

png

save a png file with the name in 'png', default = "", which means no file produced

Value

Nothing, but it does plot six graphs in a single plot.

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)
fishery <- dynamics(bestspm$par,fish,glb,props)
plotASPM(fishery,defineplot=TRUE)
ceCI <- getLNCI(fishery[,"PredCE"],bestspm$par[2])
plotASPM(fishery,CI=ceCI)

## End(Not run)  # infish=fishery; CI=NA; defineplot=TRUE; target=0.48; usef=7;png="test.png"

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