Description Usage Arguments Details Value
Checks and reformats data as required by eca.estimate
and eca.predict
1 2 3 4 5 |
samples |
data.table() with samples, each row corresponding to one sampled fish. Contains columns:
|
landings |
data.table() with total landings, each row corresponding to one cell. Contains columns:
|
fixedEffects |
character() vector specifying fixed effects. Corresponding columns must exists in samples and landings. |
randomEffects |
character() vector specifying random effects. Corresponding columns must exists samples (may also exist in landings). |
carEffect |
character() specifying a random effect with conditional autoregressive coefficient. Corresponding columns must exists samples (may also exist in landings). |
neighbours |
list() specifying the neighbourhood-structure for the carEffect. neighbours[a] should provide a vector of neighbours to a. May be NULL of no carEffect is used. |
nFish |
data.table() specifying the number of fish in the part of the catch that each sample was taken from. Not alwaus needed. See details. Columns: |
ageError |
matrix() specifying the probability of read age (rows), given true age (columns). Row and column names specify the ages. If NULL, a unit matrix is assumed (No error in age reading). |
minAge |
lowest age to include in model. If NULL, minimal age in samples is used. Age range must match any age error matrix provided (ageError) |
maxAge |
highest age to include in model. If NULL, maximal age in samples is used. Age range must match any age error matrix provided (ageError) |
maxLength |
longest length to include in model. If NULL, maximal length in samples is used. |
lengthResolution |
desired resolution for length groups. If NULL minimal difference in first testMax records are used. |
testMax |
The largest number of record to inspect for deriving lengthResolution. |
date |
POSIXct() vector, matching the number of rows in 'landings', date of catch, see details. |
month |
integer() vector, matching the number of rows in 'landings', month of catch (1 for January, etc.), see details. |
quarter |
integer() vector, vector, matching the number of rows in 'landings', quarter of catch (1 for Q1, etc.), see details.
|
The cell definition is specified by 'landings'. The type of covariates are specified in fixedEffects, randomEffects and carEffect. All fixed effects, as well as any car-effect, must be included in the cell definition. All covariates must occur in samples.
The parameters 'date', 'month', and 'quarter' are used to set the temporal resolution for catch at age prediction. Provide exactly one of these, and set the other ones to NULL. Temporal resolution need not match any temporal covariate used. One can for example run with month, even if Quarter is a covariate in the model. Note that resolution is sensitive to data volume. If you get errors in prediction with E_p(a) = nan, consider trying with quarter.
neighbours must be symetric, so that b %in% neighbours[a], implies a %in% neighbours[b]
nfish is only needed when several samples may be taken from the same catch. If these are stratified in any way (e.g. pre-sorting by size or sex), an estimate of strata sizes must be given (count). If these are replicate samples from the same selection frame, an estimate of the total catch may be given.
output GlobalParameters: While outputs AgeLength, WeightLength and Landings are complete and ready for R-ECA runs. This function populates the list of GlobalParameters only partially. Run parameters have to be added afterwards.
list() with elements:
input needed for eca.estimate
and eca.predict
input needed for eca.estimate
and eca.predict
input needed for eca.estimate
and eca.predict
input needed for eca.estimate
and eca.predict
. see details
Mapping of values for each covariate in landings and samples (including catchId) to integer value used in R-ECA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.