fcs2InteractivePrediction: Interactive FCS2 model prediction

Description Usage Arguments Warning See Also

View source: R/fcs2InteractivePrediction.R

Description

Plots the posterior distribution of the abundance and prevalence components as well as the predictive distribution of a new fish catch at a survey characterised by model covariates that can be modified interactively. Controls are provided for each covariate in the model so that the change in predictive probabilities can be visualised as covariates are adjusted. The single EQR variable can additionally be displayed and class boundaries can be provided to colour the probabilities of each class.

Usage

1
fcs2InteractivePrediction(fit, data, init.row, eqr = TRUE, boundaries = NULL)

Arguments

fit

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

data

a data frame with surveys as rows and variables as columns. It should contain all variables required by fit and is used primarily to specify the upper and lower limits for the interactive controls for each covariate.

init.row

optionally, an integer corresponding to a row in data that should be used as the initial state for each covariate. If omitted or the selected value is missing, the initial state for a covariate is selected as the average value in data.

eqr

whether to give the distribution of the EQR variable. Defaults to TRUE.

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 plots with Bad red and High blue. If NULL (default), the probability that defines the single EQR is coloured blue.

Warning

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

See Also

fcs2InteractiveLikelihood which produces a simpler interactive demonstration of how the FCS2 ZINB likelihood varies with model parameters.


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