fcs2InteractiveLikelihood: Interactive FCS2 model likelihood

Description Usage Arguments Warning See Also Examples

View source: R/fcs2InteractiveLikelihood.R

Description

Creates a plot of the FCS2 model likelihood with interactive controls that allow the model parameters to be adjusted. The likelihood represents the probability of obtaining a single fish count and the controls allow you to see how these probabilities change with the parameters. The function can visualise either the zero-inflated negative binomial (ZINB) distribution (see zinbinom) of the single catch C in the original EA FCS2 model or the ZINB distribution of the total catch T over all passes from the multiple-pass FCS2 model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fcs2InteractiveLikelihood(
  multipass = FALSE,
  eqr = FALSE,
  boundaries = NULL,
  r.limit = c(0.1, 10),
  mu.limit = c(0, 10),
  rho.limit = c(0, 1),
  a.limit = c(0, 10),
  d.limit = c(1, 7),
  q.limit = c(0, 1),
  c.limit = c(0, 20)
)

Arguments

multipass

If FALSE (the default), the ZINB likelihood of the single catch C from the original EA FCS2 model is given. If TRUE, the ZINB distribution of the total catch T over all passes from the multiple-pass FCS2 model is given. The true likelihood for this model is the multivariate ZINM distribution (see fcs2:::zinmultinom).

eqr

whether to display the EQR value.

boundaries

a vector of length 4 giving the EQR boundaries separating the classes Bad, Poor, Good, Moderate and High. These are used only to colour the plot with Bad red and High blue. If NULL (default), the probability that defines the single EQR is coloured blue.

r.limit, mu.limit, rho.limit, a.limit

vectors of giving the lower and upper limits for the interactive controls for the shape parameter r, the abundance μ, the prevalence rho and the survey area a respectively.

d.limit, q.limit

vectors of giving the lower and upper limits for the interactive controls for the number of runs d and the catch probability q respectively. These are used only if multipass = TRUE.

c.limit

vector of giving the lower and upper limit for the interactive control for the single catch. This is used only if eqr = TRUE.

Warning

This function requires the additional package rpanel for producing interactive controls.

See Also

fcs2InteractivePrediction which plot predictions from a fitted FCS2 model with interactive controls to show how the predictions change when covariates are varied.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Interactive likelihood of total catch with EQR given against class boundaries

# only run example if R is running interactively
if (interactive()) {
    # define WFD class boundaries
    boundaries <- c(0.001, 0.01, 0.25, 0.5)

    # create interactive plot
    fcs2InteractiveLikelihood(multipass=TRUE, eqr=TRUE, boundaries=boundaries)
}

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