aspmphaseplot | R Documentation |
aspmphaseplot uses the output from displayModel to plot up the phase plot of harvest rate vs Biomass, marked with the limit and default targets. It identifies the start and end years (green and red dots) and permits the stock status to be determined visually. It also plots out the catch time-series and harvest rate time-series to aid in interpretation of the phase plot.
aspmphaseplot(
fishery,
prod,
ans,
Blim = 0.2,
filename = "",
resol = 200,
fnt = 7
)
fishery |
the object output by the function dynamics, containing the fishery dynamics (Year, Catch, PredC, SpawnB, ExploitB, FullH, CPUE, PredCE, and Deplete). |
prod |
the matrix containing the production data from the function getProductionC |
ans |
the vector of results from the function prodASPM |
Blim |
the limit reference point, defaults to 0.2 so that 0.2B0 is used. |
filename |
default is empty. If a filename is put here a .png file with that name will be put into the working directory. |
resol |
the resolution of the png file, defaults to 200 dpi |
fnt |
the font used in the plot and axes. Default=7, bold Times. Using 6 gives Times, 1 will give SansSerif, 2 = bold Sans |
an invisible list of B0, Bmsy, Hmsy, and Hlim.
## Not run:
# library(datalowSA)
data(dataspm)
fish <- dataspm$fish
glb <- dataspm$glb
props <- dataspm$props
# Fit 3 par ASPM with penalty
pars <- c(13.75,0.189667,0.6)
bestL <- optim(pars,aspmPENLL,method="Nelder-Mead",
infish=fish,inglb=glb,inprops=props,
control=list(maxit = 1000, parscale = c(10,1,0.1)))
outoptim(bestL)
fisheryPen <- dynamics(bestL$par,infish=fish,inglb=glb,inprops=props)
par <- bestL$par
prod <- getProductionC(exp(par[1]),fish,glb,props,
Hrg=c(0.01,0.45,0.005),nyr=50)
anspen <- prodASPM(prod,console=TRUE,plot=TRUE)
plotprep(width=7,height=5.5)
outs <- aspmphaseplot(fisheryPen,prod,anspen,Blim=0.2,fnt=7)
str(outs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.