Learn R Programming

r4ss (version 1.24.0)

PinerPlot: Make plot of likelihood contributions by fleet

Description

This style of plot was officially named a "Piner Plot" at the CAPAM Selectivity Workshop, La Jolla March 2013. This is in honor of Kevin Piner's contributions to interpreting likelihood profiles. He's surely not the first person to make such a plot but the name seems to have stuck.

Usage

PinerPlot(summaryoutput, plot = TRUE, print = FALSE,
  component = "Length_like",
  main = "Changes in length-composition likelihoods by fleet",
  models = "all", fleets = "all", fleetnames = "default",
  profile.string = "R0", profile.label = expression(log(italic(R)[0])),
  ylab = "Change in -log-likelihood", col = "default", pch = "default",
  lty = 1, lty.total = 1, lwd = 2, lwd.total = 3, cex = 1,
  cex.total = 1.5, xlim = "default", ymax = "default", xaxs = "r",
  yaxs = "r", type = "o", legend = TRUE, legendloc = "topright",
  pwidth = 6.5, pheight = 5, punits = "in", res = 300, ptsize = 10,
  cex.main = 1, plotdir = NULL, verbose = TRUE, fleetgroups = NULL,
  likelihood_type = "raw_times_lambda", minfraction = 0.01)

Arguments

summaryoutput

List created by the function SSsummarize.

plot

Plot to active plot device?

print

Print to PNG files?

component

Which likelihood component to plot. Default is "Length_like".

main

Title for plot. Should match component.

models

Optional subset of the models described in summaryoutput. Either "all" or a vector of numbers indicating columns in summary tables.

fleets

Optional vector of fleet numbers to include.

fleetnames

Optional character vector of names for each fleet.

profile.string

Character string used to find parameter over which the profile was conducted. Needs to match substring of one of the SS parameter labels found in the Report.sso file. For instance, the default input 'steep' matches the parameter 'SR_BH_steep'.

profile.label

Label for x-axis describing the parameter over which the profile was conducted.

ylab

Label for y-axis. Default is "Change in -log-likelihood".

col

Optional vector of colors for each line.

pch

Optional vector of plot characters for the points.

lty

Line total for the liklihood components.

lty.total

Line type for the total likelihood.

lwd

Line width for the liklihood components.

lwd.total

Line width for the total likelihood.

cex

Character expansion for the points representing the likelihood components.

cex.total

Character expansion for the points representing the total likelihood.

xlim

Range for x-axis. Change in likelihood is calculated relative to values within this range.

ymax

Maximum y-value. Default is 10% greater than largest value plotted.

xaxs

The style of axis interval calculation to be used for the x-axis (see ?par for more info)

yaxs

The style of axis interval calculation to be used for the y-axis (see ?par for more info).

type

Line type (see ?plot for more info).

legend

Include legend?

legendloc

Location of legend (see ?legend for more info).

pwidth

Width of plot

pheight

Height of plot

punits

Units for PNG file

res

Resolution for PNG file

ptsize

Point size for PNG file

cex.main

Character expansion for plot titles

plotdir

Directory where PNG files will be written. by default it will be the directory where the model was run.

verbose

Return updates of function progress to the R GUI? (Doesn't do anything yet.)

fleetgroups

Optional character vector, with length equal to the number of declared fleets, where fleets with the same value are aggregated

likelihood_type

choice of "raw" or "raw_times_lambda" (the default) determines whether or not likelihoods plotted are adjusted by lambdas (likelihood weights)

minfraction

Minimum change in likelihood (over range considered) as a fraction of change in total likelihood for a component to be included in the figure.

References

Kevin Piner says that he's not the originator of this idea so Athol Whitten is going to add a reference here.