runRECA: Run R-ECA

Description Usage Arguments Details Value Examples

View source: R/prepRECA.R

Description

Runs eca.estimate and eca.predict.

Usage

1
2
3
runRECA(RecaObj, nSamples, burnin, lgamodel = "log-linear",
  fitfile = "fit", predictfile = "pred", resultdir = NULL,
  thin = 10, delta.age = 0.001, seed = NULL, caa.burnin = 0)

Arguments

RecaObj

as returned from prepRECA

nSamples

number of MCMC samples that will be made available for eca.predict. See documentation for eca.estimate,

burnin

number of MCMC samples run and discarded by eca.estimate before any samples are saved. See documentation for eca.estimate.

lgamodel

The length age relationship to use for length-age fits (options: "log-linear", "non-linear": Schnute-Richards model). See documentation for eca.estimate.

fitfile

name of output files in resultdir. See documentation for eca.estimate.

predictfile

name of output files in resultdir. See documentation for eca.predict.

resultdir

a directory where Reca may store temp-files eca.estimate and eca.predict. . If NULL, a temporary directory will be created. See documentation for eca.estimate.

thin

controls how many iterations are run between each samples saved. This may be set to account for autocorrelation introduced by Metropolis-Hastings simulation. see documentation for eca.estimate

delta.age

see documentation for eca.estimate

seed

see documentation for eca.estimate

caa.burnin

see documentation for eca.predict

Details

eca.estimate performs Markov-chain Monte Carlo (MCMC) simulations to determine maximum likelihood of parameters for the given samples.

eca.predict samples the posterior distributions of parameters estimated in eca.estimate, in order to obtain proportinos of catches and fish parameters. Using these parameters and the given total landings, predictions of distribution of catch-parameter distributions will be calculated.

If resultdir is NULL, atemporary directory will be created for its purpose. This will be attempted removed after execution. If removal is not successful a warning will be issued which includes the path to the temporary directory.

Value

list() with elements:

fit

as returned by eca.estimate

prediction

as returned by eca.predict

covariateMaps

list() mapping from Reca covariate encoding to values fed to prepRECA. As on parameter 'RecaObj'

Examples

1
 ## Not run: runRECA(prepRECA::recaPrepExample, 500, 500)

edvinf/prepRECA documentation built on Nov. 11, 2019, 6:30 a.m.