dCatch: Probabilities of the total catch distribution

Description Usage Arguments Value See Also

View source: R/Catch.R

Description

Density and distribution function of the predicted total catch over all passes.

Usage

1
dCatch(fit, x, newData, subset = 1:nrow(newData), na.action, mu, rho)

Arguments

fit

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

x

vector of (non-negative integer) quantiles.

newData

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

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 mu 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 rho 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.

Value

dCatch gives the probability mass function and pCatch the probability distribution function evaluated at values x for the selected surveys. In each case, a matrix is returned with rows for x values and columns for selected surveys.

See Also

fcs2FitModel for fitting the FCS2 model.
predict.fcs2Fit for calculating the expected total catch.
plotCatchPMF for plotting these probabilities.
dzinbinom for the zero-inflated negative binomial distribution, which these functions use.


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