calc_Q | R Documentation |
Calculates the catchability for each fishing gear.
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, ...)
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, |
species |
A numeric or character vector of the same length as |
max_catchability |
A numeric vector of length |
gear_name |
A character vector of the same length as |
custom |
An array of dimensions |
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 |
u_bound |
A numeric vector of length |
mid |
A numeric vector of length |
eps |
A numeric value specifying a numerical offset. The default is |
species_names |
A character vector of length |
... |
Vectors of the same length as |
L50 |
A numeric value representing the length at 50% of the maximum catchability of the catchability curve. This is used with the |
eta |
A numeric value representing the steepness of the slope of the catchability curve. This is used with the |
Lmu |
A numeric value representing the length at the maximum catchability of the catchability curve. This is used with the |
Lsigma |
A numeric value representing the standard deviation of the catchability curve. See 'Details' for more information. This is used with the |
Lmin |
A numeric value representing the minimum length that is caught by the catchability curve. This is used with the |
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.
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.
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.
dlnorm
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.