Modified version of make_multifig()
for multi-figure
plots of sex ratio data with crude confidence intervals (+/i 1 se) and
fits from Stock Synthesis output.
make_multifig_sexratio(
dbase,
sexratio.option = 2,
CI = 0.75,
sampsizeround = 1,
maxrows = 6,
maxcols = 6,
rows = 1,
cols = 1,
fixdims = TRUE,
main = "",
cex.main = 1,
xlab = "",
ylab = "Fraction female",
horiz_lab = "default",
xbuffer = c(0.1, 0.1),
ybuffer = "default",
yupper = NULL,
datonly = FALSE,
showsampsize = TRUE,
showeffN = TRUE,
axis1 = NULL,
axis2 = NULL,
ptscex = 1,
ptscol = gray(0.5),
linescol = 4,
lty = 1,
lwd = 2,
nlegends = 3,
legtext = list("yr", "sampsize", "effN"),
legx = "default",
legy = "default",
legadjx = "default",
legadjy = "default",
legsize = c(1.2, 1),
legfont = c(2, 1),
ipage = 0,
multifig_oma = c(5, 5, 5, 2) + 0.1,
...
)
element of list created by SS_output()
passed from
SSplotSexRatio()
code to choose among (1) female:male ratio or (2) fraction females out of the total (the default)
confidence interval for uncertainty
rounding level for sample size values
maximum (or fixed) number or rows of panels in the plot
maximum (or fixed) number or columns of panels in the plot
number or rows to return to as default for next plots to come or for single plots
number or cols to return to as default for next plots to come or for single plots
fix the dimensions at maxrows by maxcols or resize based on
number of elements in yr
input.
title of plot
character expansion for title
x-axis label
y-axis label
axis labels set horizontal all the time (TRUE), never (FALSE) or only when relatively short ("default")
extra space around points on the left and right as fraction of total width of plot
extra space around points on the bottom and top as fraction of total height of plot. "default" will cause c(0,.15) for sexratio.option=1 and c(.15, .3) for sexratio.option=2.
upper limit on ymax (applied before addition of ybuffer)
make plots of data without fits?
add sample sizes to plot
add effective sample sizes to plot
position of bottom axis values
position of left size axis values
character expansion factor for points (default=1)
color for points/bars
color for fitted model
line type
line width
number of lines of text to add as legends in each plot
text in legend, a list of length=nlegends. values may be any of 1. "yr", 2. "sampsize", 3. "effN", or a vector of length = ptsx.
vector of length=nlegends of x-values of legends (default is first one on left, all after on right)
vector of length=nlegends of y-values of legends (default is top for all plots)
left/right adjustment of legends around legx
left/right adjustment of legends around legy
font size for legends. default=c(1.2,1.0) (larger for year and normal for others)
font type for legends, same as "font" under ?par
which page of plots when covering more than will fit within maxrows by maxcols.
vector of outer margins. Can be input to SS_plots and will be passed to this function via the ... argument.
additional arguments (NOT YET IMPLEMENTED).
The SE of the sex ratio is crude and calculated as
follows. First, assume a multinomial which as MLEs of proportions. Then
use the delta method of the ratio F/M, using the MLE as the expected
values and analytical variances and covariance between F and M. After
some algebra this calculation reduces to: SE(F/M)= sqrt((f/m)^2*( (1-f)/(f*N) + (1-m)/(m*N) +2/N ))
. Confidence intervals created from
these should be considered very crude and would not necessarily be
appropriate for future alternative compositional likelihoods.
This function was derived from make_multifig and hence has a lot of overlap in functionality and arguments.