calc_Q: Calculate gear catchability

Description Usage Arguments Details Value References See Also Examples

View source: R/calc_Q.R

Description

Calculates the catchability for each fishing gear.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
calc_Q(
  curve = rep("logistic", nfish),
  species = ((0:(length(curve) - 1))%%nfish) + 1,
  max_catchability = rep(1, length(curve)),
  gear_name = paste("gear_", 1:length(curve), sep = ""),
  custom = NULL,
  nsc,
  nfish,
  l_bound,
  u_bound,
  mid,
  eps = 1e-05,
  species_names,
  ...
)

get_Q(curve, species, gear_name, nsc, nfish, l_bound, u_bound, mid, eps, ...)

logistic_catch(species, nsc, nfish, mid, eps, L50 = 50, eta = 0.25, ...)

log_gaussian_catch(species, nsc, nfish, mid, eps, Lmu = 50, Lsigma = 1, ...)

knife_edge_catch(species, nsc, nfish, l_bound, u_bound, Lmin = 50, ...)

Arguments

curve

A character vector of almost any length describing the type of curve to be used to determine the catchability of each species by the fishing gear. By default, curve is a character vector of length nfish that takes the value "logistic" in each element, but it can also take "log-gaussian" or "knife-edge". If a custom curve is required for a particular species and/or fishing gear, the curve must be specified in custom. See 'Details' for more information.

species

A numeric or character vector of the same length as curve describing the species that each element of curve relates to. By default, species is a numeric vector of length curve that takes the values (0:(length(curve)-1))%%(nfish)+1.

max_catchability

A numeric vector of length curve describing the maximum catchability for each catchability curve.

gear_name

A character vector of the same length as curve and species describing the fishing gear that each element of curve and species relates to. By default, gear_name is a character vector of length curve that takes the value paste("gear_", 1:length(curve), sep = "").

custom

An array of dimensions nsc, nfish and the number of custom catchability curves that are required. custom represents the catchability of each species by the gears specified using custom catchability curves. By default, custom is set to NULL.

nsc

A numeric value representing the number of length classes in the model.

nfish

A numeric value representing the number of fish species in the model.

l_bound

A numeric vector of length nsc representing the lower bounds of the length classes.

u_bound

A numeric vector of length nsc representing the upper bounds of the length classes.

mid

A numeric vector of length nfish representing the mid-point of the length classes.

eps

A numeric value specifying a numerical offset. The default is 1e-5.

species_names

A character vector of length nfish that is the name of the species in the same order as the species parameters.

...

Vectors of the same length as curve representing the parameters of the catchability curves. See 'Details' for more information.

L50

A numeric value representing the length at 50% of the maximum catchability of the catchability curve. This is used with the logistic_catch function. The default value is 50.

eta

A numeric value representing the steepness of the slope of the catchability curve. This is used with the logistic_catch function. The default value is 0.25

Lmu

A numeric value representing the length at the maximum catchability of the catchability curve. This is used with the log_gaussian_catch function. The default value is 50.

Lsigma

A numeric value representing the standard deviation of the catchability curve. See 'Details' for more information. This is used with the log_gaussian_catch function. The default value is 1.

Lmin

A numeric value representing the minimum length that is caught by the catchability curve. This is used with the knife_edge_catch function. The default value is 50.

Details

This function allows three different models for catchability, all of which are rescaled so that their maximum catchability is equal to one:

(1) "logistic" is proportional to

1/(1+exp(-eta*(mid-L50)));

(2) "log-gaussian" is proportional to

dlnorm(mid, log(Lmu), Lsigma);

and (3) "knife-edge" is equal to 1 for the length classes indexed by max(which(l_bound<Lmin)):nsc and 0 for all other length classes. This means that all of the individuals in the length class containing Lmin will have a catchability of 1.

In calc_Q the catchability is rescaled so that the maximum catchability is one.

Value

calc_Q returns an array of dimensions nsc, nfish and gear representing the catchability of each species by each of the fishing gears, scaled from 0 to max_catchability.

get_Q returns a catchability curve for a given species and gear scaled from 0 to 1. If an invalid catchability curve is selected, NULL is returned and a warning message is shown.

logistic_catch returns a matrix with dimensions nsc and nfish with all elements set to zero excluding one column that represents the logistic catchability curve for the selected species scaled from 0 to 1.

log_gaussian_catch returns a matrix with dimensions nsc and nfish with all elements set to zero excluding one column that represents the log-gaussian catchability curve for the selected species scaled from 0 to 1.

knife_edge_catch returns a matrix with dimensions nsc and nfish with all elements set to zero excluding one column that represents the knife-edge catchability curve for the selected species scaled from 0 to 1.

References

Hall, S. J., Collie, J. S., Duplisea, D. E., Jennings, S., Bravington, M., & Link, J. (2006). A length-based multispecies model for evaluating community responses to fishing. Canadian Journal of Fisheries and Aquatic Sciences, 63(6):1344-1359.

Thorpe, R.B., Jennings, S., Dolder, P.J. (2017). Risks and benefits of catching pretty good yield in multispecies mixed fisheries. ICES Journal of Marine Science, 74(8):2097-2106.

See Also

dlnorm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Set up the inputs to the function
nfish <- nrow(NS_par)
nsc <- 32
maxsize <- max(NS_par$Linf)*1.01 # the biggest size is 1% bigger than the largest Linf
l_bound <- seq(0, maxsize, maxsize/nsc); l_bound <- l_bound[-length(l_bound)]
u_bound <- seq(maxsize/nsc, maxsize, maxsize/nsc)
mid <- l_bound+(u_bound-l_bound)/2

# Set up the inputs to the function - species-specific parameters
Linf <- NS_par$Linf # the von-Bertalanffy asymptotic length of each species (cm).
W_a <- NS_par$W_a # length-weight conversion parameter.
W_b <- NS_par$W_b # length-weight conversion parameter.
k <- NS_par$k # the von-Bertalnaffy growth parameter.
Lmat <- NS_par$Lmat # the length at which 50\% of individuals are mature (cm).

# Calculate gear catchability
Qs <- calc_Q(curve=rep("logistic", nfish), species=NS_par$species_names,
             max_catchability=rep(1, nfish), gear_name=NS_par$species_names,
             nsc=nsc, nfish=nfish, mid=mid, l_bound=l_bound, u_bound=u_bound,
             species_names=NS_par$species_names, eta=rep(0.25, nfish), L50=Lmat)

# Calculate logistic catchability for the first species
logistic_catch(species=1, nsc, nfish, mid, eps=1e-5,L50=Lmat[1], eta=0.25)

# Calculate log-gaussian catchability for the first species
log_gaussian_catch(species=1, nsc, nfish, mid, eps=1e-5, Lmu=50, Lsigma=1)

# Calculate knife-edge catchability for the first species
knife_edge_catch(species=1, nsc, nfish, l_bound, u_bound, Lmin=50)

LeMaRns documentation built on Dec. 9, 2019, 5:09 p.m.