Description Usage Arguments Details Value Which arguments to specifiy in case files Note Author(s) See Also
View source: R/sample_calcomp.R
Sample conditional age-at-length (CAL) data and write to file for use by the EM.
1 2 | sample_calcomp(dat_list, outfile = NULL, fleets = c(1, 2), years,
Nsamp)
|
dat_list |
An SS data list object as read in from
|
outfile |
A character string specifying the file name to use
when writing the information to the disk. The string must include
the proper file extension. No file is written using the default value
of |
fleets |
*A vector of integers specifying which fleets to include.
The order of the fleets pertains to the input order of other arguments.
An entry of |
years |
*A list the same length as |
Nsamp |
*A numeric list of the same length as |
Take a data.SS_new
file containing expected values and
sample from true lengths, using length comp sample sizes, to get
realistic sample sizes for age bins given a length. Only the multinomial
distribution is currently implemented. xIf no fish are sampled then that
row is discarded. A value of NULL for fleets indicates to delete the
data so the EM If used with run_ss3sim
the case file
should be named calcomp
.
A modified .dat
file if !is.null(outfile)
. A list object
containing the modified .dat
file is returned invisibly.
All function argument descriptions that start with an asterisk (*) will be passed
through the case files to run_ss3sim
. If one of these arguments
is not specified in a case file, then a value of NULL
will be passed,
which may or may not be an appropriate value. Other arguments will be ignored
if specified.
This function is only reliable when using multinomial length compositions for the matching fleet. The real-valued length compositions resulting from the Dirichlet distribution cause difficulties in the sampling code. See the vignette for more.
Cole Monnahan, Kotaro Ono
Other sampling functions: clean_data
,
sample_agecomp
, sample_index
,
sample_lcomp
, sample_mlacomp
,
sample_wtatage
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.