predict.fcs2Fit: Predicted Total Catch

Description Usage Arguments Value See Also

View source: R/predict.fcs2Fit.R

Description

Calculates the expected total catch over all runs for a range of surveys, as predicted by a fitted FCS2 model.

Usage

1
2
## S3 method for class 'fcs2Fit'
predict(object, newData, subset = 1:nrow(newData), na.action, mu, rho, ...)

Arguments

object

an "fcs2Fit" object containing a full FCS2 model object, as returned from fcs2FitModel with runBUGS = TRUE.

newData

a data frame with surveys as rows and variables as columns. It should contain all variables required by object.

subset

an optional vector specifying a subset of surveys to calculate the predicted total catch for.

na.action

a function which indicates what should happen when the data contain missing values (NAs). The default is set by the na.action setting of options and this is usually set to na.omit. This setting removes surveys that contain missing data in any required variables. A vector indicating the rows that were removed can be extracted from the returned object using na.action. Alternatively, na.pass can be used to ignore missing values (where possible) or na.fail can be given to signal an error if missing values are found.

mu

a matrix of posterior samples of the abundance component μ can optionally be given to save recalculation if already available. This is assumed to have been calculated from abundance using the same arguments as above.

rho

a matrix of posterior samples of the prevalence component ρ can optionally be given to save recalculation if already available. This is assumed to have been calculated from prevalence using the same arguments as above.

...

Not currently used.

Value

a vector containing the expected total catch for each survey selected.

See Also

fcs2FitModel for fitting the FCS2 model.
pCatch for calculating probabilities relating to the predicted total catch.


aquaMetrics/fcs2 documentation built on Aug. 21, 2021, 12:55 p.m.