eca.predict.Rd
This function runs the C prediction program and writes results to binary files.
eca.predict(AgeLength, WeightLength, Landings, GlobalParameters)
A list with elements connected to the age-length model, see eca.estimate.
A list with elements connected to the weight-length model, see eca.estimate.
A list with elements connected to landings, see Details
A list with input parameters that are given by the user, see Details
A list with elements
array of the total catch (in numbers) with dimensions #length intervals x #age categories x #samples
matrix of the mean length in the different age categories with dimensions #age categories x #samples
matrix of the mean weight in the different age categories with dimensions #age categories x #samples
vector with age categories
vector with length intervals, on log scale
If a multiple stocks (coastal cod/Atlantic cod) analysis is run, the function returns the same list, but where the dimension of age categories in all the elements is 2 times the number of age categories in the model (ncat). The first ncat valuels correspond to Atlantic cod while the last ncat values correspond to coastal cod.
Landings
LiveWeightKG - Catch data given in kilograms for each cell.
AgeLengthCov - Covariate matrix for age-length model specifying which level of the different covariates the corresponding cell in LiveWeightKG has, e.g. constant, season, gearfactor, spatial. It also contains a column midseason which is the fraction of the year where the catch is taken.
WeightLengthCov - Covariate matrix for weight-length model specifying which level of the different covariates the corresponding cell in LiveWeightKG has, e.g. constant, season, gearfactor, spatial. It also contains a column midseason which is the fraction of the year where the catch is taken.
GlobalParameters
minage - minimum age category
maxage - maximum age category
CC - TRUE if coastal cod is included in the model, FALSE otherwise
resultdir - directory path where the results are stored. Two directories cfiles and resfiles are in this folder (created if they don't exist). In cfiles the temporary binary input files to the c-program are stored, and in resfiles the binary output files are stored.
fitfile - name of the output files from estimating the model. The files are given the extensions .mcmc1 and .mcmc2 for the age and length-given-age model and for the weight-given-length model, respectively.
predictfile - name of the output file from prediction. The file is given the extension .pred.
caa.burnin - number of MCMC samples discarded before running the prediction
seed - random seed value
eca.estimate for estimating the catch-at-age model.