vbgfCI_time {fishboot}R Documentation

VBGF plot and CI

Description

This function plots a swarm of von Bertalanffy growth functions (VBGF), as length vs time (age) curves, based on the results of bootstrap runs, with confidence intervals (CI).

Usage

vbgfCI_time(
  res,
  CI = 95,
  agemax = NULL,
  plot = TRUE,
  add_legend = TRUE,
  add_max_dens_legend = TRUE,
  xlab = "Relative time",
  ylab = "Length",
  perm.col = adjustcolor("grey50", 0.1),
  perm.lwd = 1,
  ci.col = "black",
  ci.lty = 2,
  ci.lwd = 1,
  maxd.col = "black",
  maxd.lty = 1,
  maxd.lwd = 2,
  ...
)

Arguments

res

Object with L_{inf}, K and t_0, it could be a data.frame, a tbl_df, a list, grotagBoot or a lfqBoot object. See Details.

CI

numeric. Confidence interval in % (default: 95).

agemax

numeric values indicating the maximum number of years to project.

plot

logical. If TRUE (default), a plot is returned, otherwise just a list with levels limCI, inCI, density and max_dens. See Value for a detailed description of each one.

add_legend

logical. Should CI and max. density legend be added (Default: 'add_legend = TRUE').

add_max_dens_legend

logical. Should maximum density line be added (Default: 'add_max_dens_legend = TRUE').

xlab

Label for x-axis

ylab

Label for y-axis

perm.col, perm.lwd

Color and width for each resample estimate line.

ci.col, ci.lty, ci.lwd

Color, type and width for CI line.

maxd.col, maxd.lty, maxd.lwd

Color, type and width for maximum density line.

...

Extra arguments passed to the main plot function.

Details

Each thin grey line represents the output of a single bootstrap run. The most likely optimum (i.e., the mode of the posterior distribution) is shown as a thick black line. The dashed lines show the upper and lower limits of the 95 confidence envelope. The input used for plotting is usually the result of a bootstrapped growth analysis (i.e. a lfqBoot object generated by fishboot functions such as ELEFAN_SA_boot, ELEFAN_GA_boot, grotag_boot, or grolenage_boot).

Value

A list containing:

$limCI

A data.frame with CI limits by time.

$inCI

A data.frame with logical values defining whether bootstrapping samples are within each of the defined CIs.

$density

The multivariate kernel density estimates for each sample.

$max_dens

A list with the VBGF parameter combination having the maximum density estimate.

Examples

data(alba_boot) # lfqBoot object
vbgfCI_time(res = alba_boot)

vbgfCI_time(res = alba_boot, CI = c(50, 95),
            ci.col = c("red", "orange"))

data(bonito_boot) # grotagBoot object
LinfK_scatterhist(res = bonito_boot)

[Package fishboot version 1.0.2 Index]