genFLQuant-methods: Methods to generate FLQuant objects

genFLQuantR Documentation

Methods to generate FLQuant objects

Description

This method uses the quant log-correlation matrix of the FLQuant object and generates a new FLQuant using a lognormal multivariate distribution.

Usage

genFLQuant(object, ...)

## S4 method for signature 'FLQuant'
genFLQuant(object, cv = 0.2, method = "ac", niter = 250)

## S4 method for signature 'submodel'
genFLQuant(object, type = c("link", "response"), nsim = 0, seed = NULL)

## S4 method for signature 'submodels'
genFLQuant(object, type = c("link", "response"), nsim = 0, seed = NULL)

## S4 method for signature 'a4aStkParams'
genFLQuant(
  object,
  type = c("link", "response"),
  nsim = 0,
  seed = NULL,
  simulate.recruitment = FALSE
)

Arguments

object

an FLQuant

...

additional argument list that might not ever be used.

cv

the coefficient of variation

method

the method used to compute the correlation matrix; for now only "ac" (autocorrelation) is implemented

niter

the number of iterations to be generated

type

the type of output required. The default is on the scale of the linear predictors (link); the alternative "response" is on the scale of the response variable. Thus for a model on the log scale the default predictions are of log F (for example) and type = "response" gives the predicted F.

nsim

the number of iterations to simulate, if nsim = 0, then deterministic values are returned based on the coefficients. If nsim > 0 then coefficients are simluated using the covariance slot and distribution slot.

seed

if supplied the random numbers are generate with a fixed seed for repeatablility

simulate.recruitment

if FALSE (default) recruitment is simulated from the recruitment estimates of recruitment, which may or may not be based on a stock-recruit model in the origional fit. If TRUE, then new recruitments are simulated based on the stock recruitment model and supplied CV used in the fit, rsulting in a completly different timeseries of N and Catches.

Value

an FLQuant

Examples

data(ple4)
sim.F <- genFLQuant(harvest(ple4))

flr/FLa4a documentation built on Dec. 21, 2024, 9:28 p.m.