selectivity: Selectivity functions

Description Usage Arguments Value Examples

Description

Compute various selection probabilities on lengths. logistic_selectivity produces an asymptotic selection probability based on the logistic function. exponential_l50_selectivity is the same as logistic_selectivity. andersen_selectivity and gamma_selectivity both produce dome-shaped selectivity curves. Straightline is a simple line and constant is a simple line with no slope.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

Arguments

alpha

Numeric. Steepness parameter for logistic and exponential_l50 functions, constant proportion for constant function and slope for straightline selectivity. Left to right scaling parameter for the gamma function

beta

Numeric. Intercept for the straightline function. Controls amount of doming on the gamma selectivity

l50

Numeric. Half-saturation parameter

max_prop

Numeric in [0,1]. This function controls the maximum level of selectivity in the logistic and exponential_l50 selectivity.

gamma

Numeric. Controls doming along with beta in gamma selectivity

length

Numeric. Length to evaluate selectivity on

p0-p3

Numeric. These arguments controls the shape of the Andersen selectivity function.

Value

Numeric vector the length of length ranging from 0 to max_prop

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
lengths <- 1:100
curve(logistic_selectivity(x, 0.2, 50, 0.5), 0, 100,
      ylim = c(0, 1), ylab = "Selectivity", xlab = "Length")
curve(exponential_l50_selectivity(x, 0.2, 50, 0.5), add = TRUE,
      col = "red", lty = 2)
curve(gamma_selectivity(x, 5, 0.7, 20), add = TRUE, col = 2)
curve(andersen_fleet_selectivity(x, 0.1, 0.1, 0.5, 50), add = TRUE, col = 3)
curve(constant_selectivity(x, 0.1), add = TRUE, col = 4)
curve(straightline_selectivity(x, 0.001, 0.1), add = TRUE, col = 5)
legend("topleft", legend = c("logistic", "exponential_l50", "gamma",
                              "andersen_fleet", "constant", "straightline"),
       col = c(1, "red", 2, 3, 4, 5), lty = c(1,2,1,1,1,1))

inspktrgadget/gadgetSim documentation built on May 10, 2019, 9:51 a.m.