SSMethod.Cond.TA1.8: Apply Francis composition weighting method TA1.8 for...

Description Usage Arguments Author(s) References See Also

View source: R/SSMethod.Cond.TA1.8.R

Description

Uses an extension of method TA1.8 (described in Appendix A of Francis 2011) to do stage-2 weighting of conditional age at length composition data from a Stock Synthesis model. Outputs two versions (A and B) of a mutiplier, w, (with bootstrap 95% confidence intervals) so that N2i = w x N1i, where N1i and N2i are the stage-1 and stage-2 multinomial sample sizes for the ith composition. Optionally makes a plot (for version A) of observed and expected mean ages, with two alternative sets of confidence limits - based on N1i (thin lines) and N2i (thick lines) - for the observed values.

The two versions of w differ according to whether the calculated mean ages are indexed by year (version A) or by year and length bin (version B). Version A is recommended; version B is included for historical reasons.

CAUTIONARY/EXPLANATORY NOTE. The large number of options available in SS makes it very difficult to be sure that what this function does is appropriate for all combinations of options. The following notes (for version A) might help anyone wanting to check or correct the code.

  1. The code first removes un-needed rows from database condbase.

  2. The remaining rows of the database are grouped (indexed by vector indx) and relevant statistics (e.g., observed and expected mean age), and ancillary data, are calculated for each group (these are stored in pldat - one row per group).

  3. If the data are to be plotted they are further grouped by fleet, with one panel of the plot per fleet.

  4. A single multiplier, w, is calculated to apply to all the selected data.

Usage

1
2
SSMethod.Cond.TA1.8(fit, fleet, part = 0:2, seas = NULL, plotit = TRUE,
  maxpanel = 1000, FullDiagOut = FALSE)

Arguments

fit

Stock Synthesis output as read by r4SS function SS_output

fleet

vector of one or more fleet numbers whose data are to be analysed simultaneously (the output N multiplier applies to all fleets combined)

part

vector of one or more partition values; analysis is restricted to composition data with one of these partition values. Default is to include all partition values (0, 1, 2).

seas

string indicating how to treat data from multiple seasons 'comb' - combine seasonal data for each year and plot against Yr 'sep' - treat seasons separately, plotting against Yr.S If is.null(seas) it is assumed that there is only one season in the selected data (a warning is output if this is not true) and option 'comb' is used.

plotit

if TRUE, make an illustrative plot like one or more panels of Fig. 4 in Francis (2011).

maxpanel

maximum number of panels within a plot

FullDiagOut

Print full diagnostics?

Author(s)

Chris Francis, Andre Punt, Ian Taylor

References

Francis, R.I.C.C. (2011). Data weighting in statistical fisheries stock assessment models. Canadian Journal of Fisheries and Aquatic Sciences 68: 1124-1138.

See Also

SSMethod.TA1.8


r4ss documentation built on May 29, 2017, 2:24 p.m.