plottrajectory | R Documentation |
plottrajectory plots out the predicted trajectories from those paramter combinations that have been accepted. In addition, and more importantly, it identifies those trajectories that succeeded and puts them into a smaller matrix than the complete set of trialed rK combinations and each of the successful trajectories. This can project a limited number of trajectories, determined by oneplot and plotall. If oneplot is true it does not matter what is in plotall, all trajectories are given in a single plot along with the median values in red. Similarly for the harvest rate
plottrajectory(
inR1,
years,
catch,
inparbound,
scalar = 1000,
Bmax = 2,
oneplot = TRUE,
plotout = TRUE,
plotall = 7
)
inR1 |
the output from run_cMST |
years |
the vector of years |
catch |
the vector of catches per year |
inparbound |
the set of parameter vectors that were successful |
scalar |
literally scales the catch to the same units as biomass; defaults to 1000 so as to convert Kg to tonnes. |
Bmax |
Deprecated. No longer used. Remove from any code will be depleted from later iterations of datalowSA |
oneplot |
Plot all trajectories on top of each other rather than individually. defaults to TRUE. |
plotout |
produce a plot or not? Defaults to TRUE |
plotall |
when oneplot=FALSE how many plots to generate; defaults to 7, which plots the successful trajectories from the first seven r-K pairs that had successful outcomes. Useful numbers are 7 and 15 as the total catch history is also illustrated along with the mean MSY to aid in understandig the trajectories. To see all trajectories set plotall=TRUE. |
a list of the yes/no vector and of the accepted rK pairs. This is returned invisibly.
## Not run:
data(invert)
fish <- invert$fish
glb <- invert$glb
reps <- 5000 # one would run at least 20000, preferably more
answer <- run_cMSY(fish,glb,n=reps,sigpR=0.04)
summcMSY <- summarycMSY(answer,fish,final=TRUE)
# plotprep(width=8,height=5,newdev=FALSE)
out <- plottrajectory(answer$R1,fish$year,fish$catch,answer$parbound,
oneplot=FALSE,scalar=1.0,plotout=TRUE,plotall=7)
## End(Not run) #
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.