plotASPM | R Documentation |
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.
plotASPM(infish, CI = NA, defineplot = TRUE, target = 0.48, usef = 7, png = "")
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 |
Nothing, but it does plot six graphs in a single plot.
## 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"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.