Creates a user-chosen set of plots comparing model output from a summary of
multiple models, where the collection was created using the
SSsummarize
function.
SSplotComparisons(summaryoutput, subplots = 1:20, plot = TRUE,
print = FALSE, png = print, pdf = FALSE, models = "all",
endyrvec = "default", indexfleets = NULL, indexUncertainty = FALSE,
indexQlabel = TRUE, indexQdigits = 4, indexSEvec = "default",
indexPlotEach = FALSE, labels = c("Year", "Spawning biomass (t)",
"Relative spawning biomass", "Age-0 recruits (1,000s)",
"Recruitment deviations", "Index", "Log index", "SPR ratio", "Density",
"Management target", "Minimum stock size threshold", "Spawning output",
"Harvest rate"), col = NULL, shadecol = NULL, pch = NULL, lty = 1,
lwd = 2, spacepoints = 10, staggerpoints = 1, initpoint = 0,
tickEndYr = TRUE, shadeForecast = TRUE, xlim = "default", ylimAdj = 1,
xaxs = "r", yaxs = "r", type = "o", uncertainty = TRUE,
shadealpha = 0.1, legend = TRUE, legendlabels = "default",
legendloc = "topright", legendorder = "default", legendncol = 1,
sprtarg = NULL, btarg = NULL, minbthresh = NULL, pwidth = 6.5,
pheight = 5, punits = "in", res = 300, ptsize = 10, cex.main = 1,
plotdir = NULL, filenameprefix = "", densitynames = c("SPB_Virgin",
"R0"), densityxlabs = "default", densityscalex = 1, densityscaley = 1,
densityadjust = 1, densitysymbols = TRUE, densitytails = TRUE,
densitymiddle = FALSE, densitylwd = 1, fix0 = TRUE, new = TRUE,
add = FALSE, par = list(mar = c(5, 4, 1, 1) + 0.1), verbose = TRUE,
mcmcVec = "default")
List created by SSsummarize
Vector of subplots to be created.
Plot to active plot device?
Send plots to PNG files in directory specified by
plotdir
?
Has same result as print
, included for consistency with
SS_plots
.
Write output to PDF file? Can't be used in conjunction with
png
or print
.
Optional subset of the models described in
summaryoutput
. Either "all" or a vector of numbers indicating
columns in summary tables.
Optional single year or vector of years representing the final year of values to show for each model. By default it is set to the ending year specified in each model.
Vector of fleet numbers for each model for which to compare indices of abundance. Only necessary if any model has more than one index.
Show uncertainty intervals on index data? Default=FALSE because if models have any extra standard deviations added, these intervals may differ across models.
Add catchability to legend in plot of index fits (TRUE/FALSE)?
Number of significant digits for catchability in legend
(if indexQlabel=TRUE
)
Optional replacement for the SE values in summaryoutput$indices to deal with the issue of differing uncertainty by models described above.
TRUE plots the observed index for each model with colors, or FALSE just plots observed once in black dots.
Vector of labels for plots (titles and axis labels)
Optional vector of colors to be used for lines. Input NULL
makes use of rich.colors.short
function.
Optional vector of colors to be used for shading uncertainty
intervals. Input NULL makes use of rich.colors.short
function
with alpha transparency.
Optional vector of plot character values
Optional vector of line types
Optional vector of line widths
Number of years between points shown on top of lines (for long timeseries, points every year get mashed together)
Number of years to stagger the first point (if
spacepoints > 1
) for each line (so that adjacent lines have points in
different years)
Year value for first point to be added to lines. Points added to plots are those that satisfy (Yr-initpoint)%%spacepoints == (staggerpoints*iline)%%spacepoints
TRUE/FALSE switch to turn on/off extra axis mark at final year in timeseries plots.
TRUE/FALSE switch to turn on off shading of years beyond the maximum ending year of the models
Optional x limits
Multiplier for ylim parameter. Allows additional white space to fit legend if necessary. Default=1.
Choice of xaxs parameter (see ?par for more info)
Choice of yaxs parameter (see ?par for more info)
Type parameter passed to points (default 'o' overplots points on top of lines)
Show plots with uncertainty intervals? Either a single TRUE/FALSE value, or a vector of TRUE/FALSE values for each model, or a set of integers corresponding to the choice of models.
Transparency adjustment used to make default shadecol
values (implemented as adjustcolor(col=col, alpha.f=shadealpha)
)
Add a legend?
Optional vector of labels to include in legend. Default is 'model1','model2',etc.
Location of legend. See ?legend for more info.
Optional vector of model numbers that can be used to have the legend display the model names in an order that is different than that which is represented in the summary input object.
Number of columns for the legend.
Target value for SPR-ratio where line is drawn in the SPR plots and phase plot.
Target biomass value at which to show a line (set to 0 to remove)
Minimum biomass threshhold at which to show a line (set to 0 to remove)
Width of plot
Height of plot
Units for PNG file
Resolution for PNG file
Point size for PNG file
Character expansion for plot titles
Directory where PNG or PDF files will be written. By default it will be the directory where the model was run.
Additional text to append to PNG or PDF file names. It will be separated from default name by an underscore.
Vector of names (or subset of names) of parameters or derived quantities contained in summaryoutput$pars$Label or summaryoutput$quants$Label for which to make density plots
Optional vector of x-axis labels to use in the density
plots (must be equal in length to the printed vector of quantities that
match the densitynames
input)
Scalar for upper x-limit in density plots (values below 1 will cut off the right tail to provide better contrast among narrower distributions
Scalar for upper y-limit in density plots (values below 1 will cut off top of highest peaks to provide better contrast among broader distributions
Multiplier on bandwidth of kernel in density function used for smoothing MCMC posteriors. See 'adjust' in ?density for details.
Add symbols along lines in density plots. Quantiles
are c(0.025,0.1,0.25,0.5,0.75,0.9,0.975)
.
Shade tails outside of 95% interval darker in density plots?
Shade middle inside of 95% interval darker in density plots?
Line width for density plots
Always include 0 in the density plots?
Create new empty plot window
Allows single plot to be added to existing figure. This needs to be combined with specific 'subplots' input to make sure only one thing gets added.
list of graphics parameter values passed to the par
function
Report progress to R GUI?
Vector of TRUE/FALSE values (or single value) indicating whether input values are from MCMC or to use normal distribution around MLE